aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorColin Snover2017-12-01 10:40:02 -0600
committerColin Snover2017-12-01 19:22:56 -0600
commitc7989bb333146cb369af117bc84ee9a4a819697f (patch)
treef3a269985c583db4f81c9c92ee10b38a7e2dfb2f /engines/scumm
parent5cd2c9a387537a7eb006eabed831126c4034c8f8 (diff)
downloadscummvm-rg350-c7989bb333146cb369af117bc84ee9a4a819697f.tar.gz
scummvm-rg350-c7989bb333146cb369af117bc84ee9a4a819697f.tar.bz2
scummvm-rg350-c7989bb333146cb369af117bc84ee9a4a819697f.zip
SCUMM: Fix buffer overflow reading default v70HE cursor
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/cursor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 6445d257f6..cdccfd48ba 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -205,7 +205,9 @@ void ScummEngine_v70he::setDefaultCursor() {
}
p <<= 2;
- if ((j + 1) % 8 == 0)
+ if (j == 31)
+ ++src;
+ else if ((j + 1) % 8 == 0)
p = *(++src);
}
}