bugfix: GC more forgiving

This commit is contained in:
Araq 2011-04-03 22:59:00 +02:00
commit b38c7adad1
5 changed files with 14 additions and 8 deletions

View file

@ -333,11 +333,11 @@ proc parse(x: var TXmlParser, errors: var seq[string]): PXmlNode =
of xmlElementOpen:
result = newElement(x.elementName.toLower)
next(x)
result.attr = newStringTable()
result.attrs = newStringTable()
while true:
case x.kind
of xmlAttribute:
result.attr[x.attrKey] = x.attrValue
result.attrs[x.attrKey] = x.attrValue
next(x)
of xmlElementClose:
next(x)