aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-09-01 07:59:30 +0000
committerMax Horn2004-09-01 07:59:30 +0000
commitd8fe05a5fa9de0122aefbd8811d0e1110c7dec3f (patch)
tree2c20028e76f92367f631aad62e538f242ac21744
parent2a219cc70108908251b113a78f22dc433c244ef4 (diff)
downloadscummvm-rg350-d8fe05a5fa9de0122aefbd8811d0e1110c7dec3f.tar.gz
scummvm-rg350-d8fe05a5fa9de0122aefbd8811d0e1110c7dec3f.tar.bz2
scummvm-rg350-d8fe05a5fa9de0122aefbd8811d0e1110c7dec3f.zip
Fix incorrect flObject base address computation
svn-id: r14854
-rw-r--r--scumm/script.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp
index 6db787bcd0..a76b2a2af6 100644
--- a/scumm/script.cpp
+++ b/scumm/script.cpp
@@ -407,8 +407,10 @@ void ScummEngine::getScriptBaseAddress() {
case WIO_FLOBJECT: /* flobject script */
idx = getObjectIndex(ss->number);
- _scriptOrgPointer = getResourceAddress(rtFlObject, _objs[idx].fl_object_index);
- assert(_objs[idx].fl_object_index < _numFlObject);
+ assert(idx != -1);
+ idx = _objs[idx].fl_object_index;
+ _scriptOrgPointer = getResourceAddress(rtFlObject, idx);
+ assert(idx < _numFlObject);
_lastCodePtr = &_baseFLObject[idx];
break;
default: