Browse Source

Fix Element.GetElementsByTagName (Lua) returning 0-indexed results.

Erik Crevel 4 years ago
parent
commit
ab239bed5b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Lua/Element.cpp

+ 1 - 1
Source/Lua/Element.cpp

@@ -182,7 +182,7 @@ int ElementGetElementsByTagName(lua_State* L, Element* obj)
     lua_newtable(L);
     for(unsigned int i = 0; i < list.size(); i++)
     {
-        lua_pushinteger(L,i);
+        PushIndex(L,i);
         LuaType<Element>::push(L,list[i],false);
         lua_settable(L,-3); //-3 is the table
     }