Skip to content

Commit c99423b

Browse files
authored
Fix CLuaFunctionParserBase lua_State* index check (#1419)
1 parent af32894 commit c99423b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Shared/mods/deathmatch/logic/lua/CLuaFunctionParser.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
struct CLuaFunctionParserBase
2020
{
21+
// iIndex is passed around by reference
2122
std::size_t iIndex = 1;
23+
2224
std::string strError = "";
2325
std::string strErrorFoundType = "";
2426

@@ -212,7 +214,7 @@ struct CLuaFunctionParserBase
212214

213215
// lua_State* can be taken as first argument of any function
214216
if constexpr (std::is_same_v<T, lua_State*>)
215-
return index == 0;
217+
return index == 1;
216218

217219
// variants can be used by any of the underlying types
218220
// thus recursively use this function

0 commit comments

Comments
 (0)