aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-31 13:32:04 +0200
committerEugene Sandulenko2016-05-31 17:12:18 +0200
commit89890523c236681ebf32922d956587c9b44e270d (patch)
tree34b1e51a18add8e8c75289b25b982a91a4f4366c /engines/tinsel
parentb53d8104b7b8db79fa91285838590bc0f41b5447 (diff)
downloadscummvm-rg350-89890523c236681ebf32922d956587c9b44e270d.tar.gz
scummvm-rg350-89890523c236681ebf32922d956587c9b44e270d.tar.bz2
scummvm-rg350-89890523c236681ebf32922d956587c9b44e270d.zip
TINSEL: Guard against illegal memory writes
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/play.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp
index ef3127233d..a4f5bc8261 100644
--- a/engines/tinsel/play.cpp
+++ b/engines/tinsel/play.cpp
@@ -159,6 +159,9 @@ static int RegisterSoundReel(SCNHANDLE hFilm, int column, int actorCol) {
}
}
+ if (i == MAX_SOUNDREELS)
+ error("Out of sound reels in RegisterSoundReel()");
+
g_soundReelNumbers[i]++;
return i;
}