Impossible to exit infinite while loop #197

review changes for https://github.com/nesbox/TIC-80/commit/18aca45673f2311215b24db42f65fa23cc2dcbc4#r26209938
This commit is contained in:
BADIM-PC\Vadim committed 2017-12-12 13:46:05 +03:00
1 parent 18aca45673
commit c90b3ba171
3 files changed
+7 -17

No files matched your search

+2 -7
View File
@@ -1069,13 +1069,8 @@ static void checkForceExit(lua_State *lua, lua_Debug *luadebug)
tic_tick_data* tick = machine->data;
if(tick->hook)
{
tick->hook(tick->data);
if(tick->forceExit)
luaL_error(lua, "script execution was interrupted");
}
if(tick->forceExit && tick->forceExit(tick->data))
luaL_error(lua, "script execution was interrupted");
}
static void initAPI(tic_machine* machine)