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
455
455
using param = typename is_2specialization<T, std::vector>::param1_t ;
456
456
T vecData;
457
457
lua_pushnil (L); /* first key */
458
- while (lua_next (L, index) != 0 )
458
+ while (lua_next (L, index < 0 ? (index - 1 ) : index ) != 0 )
459
459
{
460
460
if (!TypeMatch<param>(L, -1 ))
461
461
{
@@ -477,7 +477,7 @@ struct CLuaFunctionParserBase
477
477
using value_t = typename is_5specialization<T, std::unordered_map>::param2_t ;
478
478
T map;
479
479
lua_pushnil (L); /* first key */
480
- while (lua_next (L, index) != 0 )
480
+ while (lua_next (L, index < 0 ? (index - 1 ) : index ) != 0 )
481
481
{
482
482
if (!TypeMatch<value_t >(L, -1 ) || !TypeMatch<key_t >(L, -2 ))
483
483
{
You can’t perform that action at this time.
0 commit comments