Merged stack cleaning methods. (Mentioned in patch #1432.)
This commit is contained in:
parent
0d75d88b69
commit
9a24966d0a
1 changed files with 2 additions and 6 deletions
|
@ -409,6 +409,7 @@ static vconfig luaW_checkvconfig(lua_State *L, int index, bool allow_missing = f
|
|||
|
||||
/**
|
||||
* Calls a Lua function stored below its @a nArgs arguments at the top of the stack.
|
||||
* @param nRets LUA_MULTRET for unbounded return values.
|
||||
* @return true if the call was successful and @a nRets return values are available.
|
||||
*/
|
||||
bool luaW_pcall(lua_State *L
|
||||
|
@ -447,12 +448,7 @@ bool luaW_pcall(lua_State *L
|
|||
}
|
||||
|
||||
// Remove the error handler.
|
||||
|
||||
if(nRets == LUA_MULTRET) {
|
||||
lua_remove(L, error_handler_index);
|
||||
} else {
|
||||
lua_remove(L, -1 - nRets);
|
||||
}
|
||||
lua_remove(L, error_handler_index);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue