Fixed assignment to entry in nil map

This commit is contained in:
Sasha Koshka 2022-08-20 13:29:04 -04:00
parent bd433fc65d
commit edb9c1a0b6

View File

@ -32,9 +32,9 @@ func (parser *ParsingOperation) parseBody () (err error) {
case "objt": case "objt":
var section *ObjtSection var section *ObjtSection
section, err = parser.parseObjtSection() section, err = parser.parseObjtSection()
if parser.tree.typeSections == nil { if parser.tree.objtSections == nil {
parser.tree.typeSections = parser.tree.objtSections =
make(map[string] *TypeSection) make(map[string] *ObjtSection)
} }
parser.tree.objtSections[section.name] = section parser.tree.objtSections[section.name] = section
if err != nil { return } if err != nil { return }