Limit vm.numNestedScripts to positive value, when subtracting slot in runScriptNested(). Fixes restart, after ending sequence in freddi4

svn-id: r23153
This commit is contained in:
Travis Howell 2006-06-17 05:48:43 +00:00
parent 7675b3546d
commit b81b9ac124

View file

@ -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