aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-09-02 01:05:32 +0200
committerBertrand Augereau2011-09-02 01:05:32 +0200
commit35d88d498cbb4d5e94befc1d976539c1079dd5bf (patch)
tree5df90e5326acf8051ff78cdafe7e158dc0d50aeb /engines
parentfa91f3abf1a4b332594a51f119ab643509cec25c (diff)
downloadscummvm-rg350-35d88d498cbb4d5e94befc1d976539c1079dd5bf.tar.gz
scummvm-rg350-35d88d498cbb4d5e94befc1d976539c1079dd5bf.tar.bz2
scummvm-rg350-35d88d498cbb4d5e94befc1d976539c1079dd5bf.zip
DREAMWEB: Fix : getexpos has a return value AND a side-effect
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/stubs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index bb05a2b0d2..9e98fd068e 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1255,10 +1255,12 @@ void DreamGenContext::getexpos() {
const DynObject *objects = (const DynObject *)segRef(data.word(kExtras)).ptr(kExdata, sizeof(DynObject));
for (size_t i = 0; i < kNumexobjects; ++i) {
if (objects[i].mapad[0] == 0xff) {
+ data.byte(kExpos) = i;
di = kExdata + i * sizeof(DynObject);
return;
}
}
+ data.byte(kExpos) = kNumexobjects;
di = kExdata + kNumexobjects * sizeof(DynObject);
}