aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-12-11 22:20:48 -0500
committerPaul Gilbert2013-12-11 22:20:48 -0500
commit7f018dafd5e56285e40d834de17447de3894a148 (patch)
tree22e714e4d985ca0c4051e877df2b2fb124827334
parentd5762b5332d0031cd3e4327fb868d8358dcaf7c2 (diff)
downloadscummvm-rg350-7f018dafd5e56285e40d834de17447de3894a148.tar.gz
scummvm-rg350-7f018dafd5e56285e40d834de17447de3894a148.tar.bz2
scummvm-rg350-7f018dafd5e56285e40d834de17447de3894a148.zip
VOYEUR: Bugfixes for getField1CE method
-rw-r--r--engines/voyeur/files_threads.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index dc9d014992..0c0e9aba9e 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -169,10 +169,11 @@ void ThreadResource::getButtonsFlags() {
void ThreadResource::getField1CE() {
int idx = 0;
- for (const byte *p = _field4A; *p != 0x49; p = getNextRecord(p)) {
+ for (const byte *p = _field4A; *p++ != 0x49; p = getNextRecord(p)) {
assert(idx < 47);
_field1CE[idx++] = getRecordOffset(p);
_field1CE[idx] = NULL;
+ p += 4;
}
}
@@ -199,7 +200,7 @@ void ThreadResource::initUseCount() {
}
const byte *ThreadResource::getRecordOffset(const byte *p) {
- uint32 recSize = READ_LE_UINT32(p) + READ_LE_UINT32(p + 6);
+ uint32 recSize = READ_LE_UINT32(p) + READ_LE_UINT32(_ctlPtr + 6);
return _ctlPtr + recSize;
}