diff options
author | Florian Kagerer | 2010-08-03 16:54:39 +0000 |
---|---|---|
committer | Florian Kagerer | 2010-08-03 16:54:39 +0000 |
commit | 824a5f32a043486b3e15b9a01f0651ac7ae6a372 (patch) | |
tree | b58c6834a1dc48383d6ec0c5545af7bd7144fb35 /engines | |
parent | 13824582d1dc3d1d6df6b57e171f6357799e0489 (diff) | |
download | scummvm-rg350-824a5f32a043486b3e15b9a01f0651ac7ae6a372.tar.gz scummvm-rg350-824a5f32a043486b3e15b9a01f0651ac7ae6a372.tar.bz2 scummvm-rg350-824a5f32a043486b3e15b9a01f0651ac7ae6a372.zip |
LOL: fixed possible crash in environmental sfx code
svn-id: r51706
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/sound_lol.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index 1bcb77c89d..c233987120 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -225,7 +225,7 @@ void LoLEngine::snd_processEnvironmentalSoundEffect(int soundId, int block) { for (int i = 3; i > 0; i--) { int dir = calcMonsterDirection(cbl & 0x1f, cbl >> 5, block & 0x1f, block >> 5); - cbl += blockShiftTable[dir]; + cbl = (cbl + blockShiftTable[dir]) & 0x3ff; if (cbl != block) { if (testWallFlag(cbl, 0, 1)) _environmentSfxVol >>= 1; |