summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman_oal.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-20 20:22:40 +0200
committereray orçunus <erayorcunus@gmail.com>2020-05-20 20:22:40 +0200
commit5b953228b416ac894026fe9509a39a4e3b8850b3 (patch)
treed1eff63c9e59f367ff3197c9dc57d0ad1f30262e /src/audio/sampman_oal.cpp
parentMerge pull request #572 from erorcun/miami (diff)
downloadre3-5b953228b416ac894026fe9509a39a4e3b8850b3.tar
re3-5b953228b416ac894026fe9509a39a4e3b8850b3.tar.gz
re3-5b953228b416ac894026fe9509a39a4e3b8850b3.tar.bz2
re3-5b953228b416ac894026fe9509a39a4e3b8850b3.tar.lz
re3-5b953228b416ac894026fe9509a39a4e3b8850b3.tar.xz
re3-5b953228b416ac894026fe9509a39a4e3b8850b3.tar.zst
re3-5b953228b416ac894026fe9509a39a4e3b8850b3.zip
Diffstat (limited to 'src/audio/sampman_oal.cpp')
-rw-r--r--src/audio/sampman_oal.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 30efd7f5..f16afbba 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -800,6 +800,10 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
for (int32 i = 0; i < _TODOCONST(3); i++)
{
slot = nCurrentPedSlot - i - 1;
+#ifdef FIX_BUGS
+ if (slot < 0)
+ slot += ARRAY_SIZE(nPedSlotSfx);
+#endif
if (nComment == nPedSlotSfx[slot])
return slot;
}