]> git.sesse.net Git - vlc/commitdiff
XML: fix two small mistakes in Lua
authorJean-Philippe André <jpeg@videolan.org>
Sat, 22 Jan 2011 13:44:55 +0000 (14:44 +0100)
committerJean-Philippe André <jpeg@videolan.org>
Sat, 22 Jan 2011 13:44:55 +0000 (14:44 +0100)
modules/misc/lua/libs/xml.c
share/lua/modules/simplexml.lua

index ace308a2135784458387ba9369ab6c83acdfee15..74f05f94a00a7bfcd67d49a81308acdb21d55d73 100644 (file)
@@ -140,7 +140,7 @@ static int vlclua_xml_reader_next_attr( lua_State *L )
 
     lua_pushstring( L, xml_ReaderNextAttr( p_reader, &psz_value ) );
     lua_pushstring( L, psz_value );
-    return 1;
+    return 2;
 }
 
 void luaopen_xml( lua_State *L )
index 2b7f18d10c6afc29d3faa94ab938dab22bce916e..851b7e611f5ae24e349fb984503650d3bd0211a8 100644 (file)
@@ -75,7 +75,7 @@ local function parsexml(stream, errormsg)
                 table.remove(parents)
             end
         elseif nodetype == 3 then
-            table.insert(tree.children, reader:value())
+            table.insert(tree.children, nodename)
         end
         nodetype, nodename = reader:next_node()
     end