diff options
Diffstat (limited to 'engines/sword25/util/lua_serialization_util.cpp')
-rw-r--r-- | engines/sword25/util/lua_serialization_util.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/sword25/util/lua_serialization_util.cpp b/engines/sword25/util/lua_serialization_util.cpp index 80009aff60..80c5f86b20 100644 --- a/engines/sword25/util/lua_serialization_util.cpp +++ b/engines/sword25/util/lua_serialization_util.cpp @@ -65,12 +65,12 @@ void pushString(lua_State *luaState, TString *str) { /* A simple reimplementation of the unfortunately static function luaA_index. * Does not support the global table, registry, or upvalues. */ StkId getObject(lua_State *luaState, int stackpos) { - if(stackpos > 0) { - lua_assert(luaState->base+stackpos-1 < luaState->top); - return luaState->base+stackpos-1; + if (stackpos > 0) { + lua_assert(luaState->base + stackpos - 1 < luaState->top); + return luaState->base + stackpos - 1; } else { - lua_assert(L->top-stackpos >= L->base); - return luaState->top+stackpos; + lua_assert(L->top - stackpos >= L->base); + return luaState->top + stackpos; } } |