From abcd44cd683c91ec52b887cacee2d4fbff7e7e4c Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 7 May 2005 08:10:23 +0000 Subject: Missed one section. svn-id: r17939 --- scumm/script_v100he.cpp | 4 ++++ scumm/script_v7he.cpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 45d18ccf8b..b132d0263d 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -1102,6 +1102,10 @@ void ScummEngine_v100he::o100_resourceRoutines() { break; case 136: // Queue loading + if (_heResType == rtScript && _heResId >= _numGlobalScripts) + break; + + ensureResourceLoaded(_heResType, _heResId); break; case 137: if (_heResType == rtScript && _heResId >= _numGlobalScripts) diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index 5ba8004a14..b85e6da83d 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -512,7 +512,6 @@ void ScummEngine_v70he::o70_resourceRoutines() { subOp = fetchScriptByte(); - debug(0, "o70_resourceRoutines: case %d", subOp); switch (subOp) { case 100: // SO_LOAD_SCRIPT resid = pop(); @@ -606,6 +605,8 @@ void ScummEngine_v70he::o70_resourceRoutines() { case 120: // Queue load script resid = pop(); + if (resid >= _numGlobalScripts) + break; ensureResourceLoaded(rtScript, resid); break; case 121: -- cgit v1.2.3