aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-11-05 13:39:09 +0000
committerMax Horn2002-11-05 13:39:09 +0000
commit4bde7140a22011de97017f674022d50a5934eec2 (patch)
tree5bd4de81ed6b4e496484c49c8f146633eb4c2a48 /scumm
parentd0d709627c3ce57b6137be2026d95a01125f97b9 (diff)
downloadscummvm-rg350-4bde7140a22011de97017f674022d50a5934eec2.tar.gz
scummvm-rg350-4bde7140a22011de97017f674022d50a5934eec2.tar.bz2
scummvm-rg350-4bde7140a22011de97017f674022d50a5934eec2.zip
fix for bug #633082; added some asserts to catch similiar problems in the future
svn-id: r5417
Diffstat (limited to 'scumm')
-rw-r--r--scumm/sound.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index c44b7fedd0..c01e96e665 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -518,9 +518,11 @@ int Sound::startTalkSound(uint32 offset, uint32 b, int mode) {
while (num > 0) {
_sfxFile->read(&file_byte, sizeof(file_byte));
_sfxFile->read(&file_byte_2, sizeof(file_byte_2));
+ assert(i < ARRAYSIZE(_mouthSyncTimes));
_mouthSyncTimes[i++] = file_byte | (file_byte_2 << 8);
num--;
}
+ assert(i < ARRAYSIZE(_mouthSyncTimes));
_mouthSyncTimes[i] = 0xFFFF;
_sfxMode |= mode;
_curSoundPos = 0;