-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
Description
I have found that if a XML file contains two identical elements that are empty, xml2lua can't cope with that and crashes.
This is a sample of problematic XML:
<item>
<values>
<value>Lorem</value>
<value>ipsum</value>
<value>dolor</value>
<value></value>
<value></value>
</values>
</item>
It produces the following error:
lua: /usr/share/lua/5.3/xmlhandler/tree.lua:118: bad argument #1 to 'insert' (table expected, got string)
stack traceback:
[C]: in function 'table.insert'
/usr/share/lua/5.3/xmlhandler/tree.lua:118: in function 'xmlhandler.tree.starttag'
/usr/share/lua/5.3/XmlParser.lua:345: in upvalue 'parseNormalTag'
/usr/share/lua/5.3/XmlParser.lua:377: in upvalue 'parseTagType'
/usr/share/lua/5.3/XmlParser.lua:449: in function 'XmlParser.parse'
xml2lua-test.lua:19: in main chunk
[C]: in ?