SCI: Got rid of EngineState::execution_stack_pos; overally, the resulting code should be even stricter in detecting invalid VM stack access (and some bugs when loading saves might be fixed now...)

svn-id: r40694
This commit is contained in:
Max Horn 2009-05-18 18:15:45 +00:00
parent b2b08cc606
commit b0c1cf52e0
12 changed files with 121 additions and 129 deletions

View file

@ -652,7 +652,7 @@ reg_t kRestoreGame(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (newstate) {
s->successor = newstate;
script_abort_flag = SCRIPT_ABORT_WITH_REPLAY; // Abort current game
s->execution_stack_pos = s->execution_stack_base;
s->_executionStack.resize(s->execution_stack_base + 1);
} else {
s->r_acc = make_reg(0, 1);
sciprintf("Restoring failed (game_id = '%s').\n", game_id);