aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTravis Howell2006-06-17 05:48:43 +0000
committerTravis Howell2006-06-17 05:48:43 +0000
commitb81b9ac1243535d8ff3dd7316a3eb7da5b5be3bc (patch)
treede5cf2bcd0f4527175058a79487b4ffe3af7d2db /engines/scumm
parent7675b3546de924770caa870e65320cf070f347e8 (diff)
downloadscummvm-rg350-b81b9ac1243535d8ff3dd7316a3eb7da5b5be3bc.tar.gz
scummvm-rg350-b81b9ac1243535d8ff3dd7316a3eb7da5b5be3bc.tar.bz2
scummvm-rg350-b81b9ac1243535d8ff3dd7316a3eb7da5b5be3bc.zip
Limit vm.numNestedScripts to positive value, when subtracting slot in runScriptNested(). Fixes restart, after ending sequence in freddi4
svn-id: r23153
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/script.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index ab365e7c87..1d0fca7b37 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -336,7 +336,8 @@ void ScummEngine::runScriptNested(int script) {
getScriptEntryPoint();
executeScript();
- vm.numNestedScripts--;
+ if (vm.numNestedScripts != 0)
+ vm.numNestedScripts--;
if (nest->number != 0xFF) {
// Try to resume the script which called us, if its status has not changed