diff options
| author | Max Horn | 2009-05-18 18:15:45 +0000 |
|---|---|---|
| committer | Max Horn | 2009-05-18 18:15:45 +0000 |
| commit | b0c1cf52e0e4d1e092f9cc25fce9eb86b68b7670 (patch) | |
| tree | c3da948dfbf54a0f78efc34762b71b6f6aa34400 /engines/sci/engine/gc.cpp | |
| parent | b2b08cc606597dcbc93dcb346f845083e9dc5182 (diff) | |
| download | scummvm-rg350-b0c1cf52e0e4d1e092f9cc25fce9eb86b68b7670.tar.gz scummvm-rg350-b0c1cf52e0e4d1e092f9cc25fce9eb86b68b7670.tar.bz2 scummvm-rg350-b0c1cf52e0e4d1e092f9cc25fce9eb86b68b7670.zip | |
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
Diffstat (limited to 'engines/sci/engine/gc.cpp')
| -rw-r--r-- | engines/sci/engine/gc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp index 9de5357b38..cf556869ee 100644 --- a/engines/sci/engine/gc.cpp +++ b/engines/sci/engine/gc.cpp @@ -86,7 +86,7 @@ reg_t_hash_map *find_all_used_references(EngineState *s) { // Init: Value Stack // We do this one by hand since the stack doesn't know the current execution stack { - ExecStack &xs = s->_executionStack[s->execution_stack_pos]; + ExecStack &xs = s->_executionStack.back(); reg_t *pos; for (pos = s->stack_base; pos < xs.sp; pos++) @@ -97,7 +97,7 @@ reg_t_hash_map *find_all_used_references(EngineState *s) { #endif // Init: Execution Stack - for (i = 0; (int)i <= s->execution_stack_pos; i++) { + for (i = 0; i < s->_executionStack.size(); i++) { ExecStack &es = s->_executionStack[i]; if (es.type != EXEC_STACK_TYPE_KERNEL) { |
