aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/game_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/game_v2.cpp')
-rw-r--r--engines/gob/game_v2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp
index d5c237c974..4ccd6d718e 100644
--- a/engines/gob/game_v2.cpp
+++ b/engines/gob/game_v2.cpp
@@ -151,7 +151,7 @@ void Game_v2::playTot(int16 skipPlay) {
if (_totTextData->dataPtr != 0) {
Common::MemoryReadStream totTextData(_totTextData->dataPtr,
4294967295U);
- _totTextData->itemsCount = MIN<int32>(totTextData.readSint16LE(), (size - 2) / 4);
+ _totTextData->itemsCount = totTextData.readSint16LE() & 0x3FFF;
_totTextData->items = new TotTextItem[_totTextData->itemsCount];
for (int i = 0; i < _totTextData->itemsCount; ++i) {