mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 08:23:15 +00:00
SCI32: Explicitly abord kEachElementDo when a game is being loaded
This is a better check than the one in commit 3d1f1a3a21
This commit is contained in:
parent
6ce472a12a
commit
6929cc65f8
@ -576,9 +576,10 @@ reg_t kListEachElementDo(EngineState *s, int argc, reg_t *argv) {
|
||||
}
|
||||
} else {
|
||||
invokeSelector(s, curObject, slc, argc, argv, argc - 2, argv + 2);
|
||||
// Check if the list has been invalidated after the call above
|
||||
// (e.g. when restoring in Torin)
|
||||
if (s->_segMan->getSegmentType(argv[0].getSegment()) != SEG_TYPE_LISTS)
|
||||
// Check if the call above leads to a game restore, in which case
|
||||
// the segment manager will be reset, and the original list will
|
||||
// be invalidated
|
||||
if (s->abortScriptProcessing == kAbortLoadGame)
|
||||
return s->r_acc;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user