diff options
-rw-r--r-- | scumm/sound.cpp | 2 |
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; |