mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 15:40:57 +00:00
When loading or restarting, stop script processing if the game is being loaded or is restarting and the stack position has changed (it's always changed when loading) - fixes the case where the VM is trying to parse an invalid script
svn-id: r50121
This commit is contained in:
parent
38b172e8e5
commit
97dd94019c
@ -773,6 +773,9 @@ void run_vm(EngineState *s, bool restoring) {
|
||||
g_debugState.old_pc_offset = s->xs->addr.pc.offset;
|
||||
g_debugState.old_sp = s->xs->sp;
|
||||
|
||||
if (s->abortScriptProcessing != kAbortNone || g_engine->shouldQuit())
|
||||
return; // Stop processing
|
||||
|
||||
if (s->_executionStackPosChanged) {
|
||||
Script *scr;
|
||||
s->xs = &(s->_executionStack.back());
|
||||
@ -829,7 +832,7 @@ void run_vm(EngineState *s, bool restoring) {
|
||||
}
|
||||
|
||||
if (s->abortScriptProcessing != kAbortNone || g_engine->shouldQuit())
|
||||
return; // Emergency
|
||||
return; // Stop processing
|
||||
|
||||
// Debug if this has been requested:
|
||||
// TODO: re-implement sci_debug_flags
|
||||
|
Loading…
x
Reference in New Issue
Block a user