Skip to content

Commit aaa6277

Browse files
committed
Make luaSL_createtimermanager() use value on _top_ of stack
1 parent a0220db commit aaa6277

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

VM/src/llltimers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ static void lltimers_dtor(lua_State *L, void *data)
7575
int luaSL_createtimermanager(lua_State *L)
7676
{
7777
// Validate LLEvents parameter on top of stack
78-
if (!lua_touserdatatagged(L, 1, UTAG_LLEVENTS))
79-
luaL_typeerror(L, 1, "LLEvents");
78+
if (!lua_touserdatatagged(L, -1, UTAG_LLEVENTS))
79+
luaL_typeerror(L, -1, "LLEvents");
8080

81-
lua_checkstack(L, 3);
81+
lua_checkstack(L, 5);
8282

8383
// Store LLEvents reference and remove from stack
8484
int llevents_ref = lua_ref(L, 1);

0 commit comments

Comments
 (0)