Fixed DataSection/TypeSection.ToString

This commit is contained in:
Sasha Koshka 2022-09-27 18:43:40 -04:00
parent 6c70e9c50d
commit 3a38465368

View File

@ -186,7 +186,9 @@ func (section DataSection) ToString (indent int) (output string) {
section.name, ":",
section.what.ToString(), "\n")
output += section.argument.ToString(indent + 1, true)
if section.argument.kind != ArgumentKindNil {
output += section.argument.ToString(indent + 1, true)
}
if section.external {
output += doIndent(indent + 1, "external\n")
@ -203,7 +205,9 @@ func (section TypeSection) ToString (indent int) (output string) {
section.name, ":",
section.what.ToString(), "\n")
output += section.argument.ToString(indent + 1, true)
if section.argument.kind != ArgumentKindNil {
output += section.argument.ToString(indent + 1, true)
}
return
}