Skip to content

Commit 379394a

Browse files
committed
Add more lua_settop() calls
1 parent dbb0540 commit 379394a

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

VM/src/lll.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ static int ll_dumplist2string(lua_State *L)
382382
{
383383
luaL_checktype(L, 1, LUA_TTABLE);
384384
luaL_checktype(L, 2, LUA_TSTRING);
385+
lua_settop(L, 2);
385386
auto *h = hvalue(luaA_toobject(L, 1));
386387
int len = luaH_getn(h);
387388

VM/src/llsl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ static int lsl_table_concat(lua_State *L)
598598
if (lua_type(L, 1) != LUA_TTABLE && lua_type(L, 2) != LUA_TTABLE)
599599
luaL_errorL(L, "At least one argument must be a table");
600600

601+
lua_settop(L, 2);
601602
lua_checkstack(L, 4);
602603

603604
// Note: reversed because of LSL evaluation order!

0 commit comments

Comments
 (0)