Skip to content

Commit

Permalink
Testing?
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Nov 26, 2023
1 parent 694d3b0 commit d1a6ac1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions source/lua_ILuaInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,20 @@ void RunString(ILuaThread* thread, const char* str)
{
int result = func_luaL_loadstring(LUA->GetState(), str);
HandleError(LUA, result);
}
else
{
HandleError(LUA, -1); // Could crash if the Lua Panic wan't created by pcall or loadstring.
}

result = func_lua_pcall(LUA->GetState(), 0, 0, 0);
if (setjmp(thread->jumpBuffer) == 0)
{
int result = func_lua_pcall(LUA->GetState(), 0, 0, 0);
HandleError(LUA, result);
}
else
{
//HandleError(LUA, -1); // Could crash if the Lua Panic wan't created by pcall or loadstring.
LUA->Pop();

Msg("Error Happend.\n");
HandleError(LUA, -1); // Could crash if the Lua Panic wan't created by pcall or loadstring.
}
}

Expand Down

0 comments on commit d1a6ac1

Please sign in to comment.