File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Shared/mods/deathmatch/logic/lua Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -455,7 +455,7 @@ struct CLuaFunctionParserBase
455455 using param = typename is_2specialization<T, std::vector>::param1_t ;
456456 T vecData;
457457 lua_pushnil (L); /* first key */
458- while (lua_next (L, index) != 0 )
458+ while (lua_next (L, index < 0 ? (index - 1 ) : index ) != 0 )
459459 {
460460 if (!TypeMatch<param>(L, -1 ))
461461 {
@@ -477,7 +477,7 @@ struct CLuaFunctionParserBase
477477 using value_t = typename is_5specialization<T, std::unordered_map>::param2_t ;
478478 T map;
479479 lua_pushnil (L); /* first key */
480- while (lua_next (L, index) != 0 )
480+ while (lua_next (L, index < 0 ? (index - 1 ) : index ) != 0 )
481481 {
482482 if (!TypeMatch<value_t >(L, -1 ) || !TypeMatch<key_t >(L, -2 ))
483483 {
You can’t perform that action at this time.
0 commit comments