summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-04-16 21:21:43 +0200
committerGitHub <noreply@github.com>2020-04-16 21:21:43 +0200
commit435a9ca7f272f0238440b939bc57c78d2385dd1a (patch)
tree78ca1babbac01fff758c20ed9ae4bc3ffb210095 /src/audio/sampman.cpp
parentMore refs removed (diff)
parentSome refs removed, little fixes and teleport (diff)
downloadre3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar
re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.gz
re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.bz2
re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.lz
re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.xz
re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.tar.zst
re3-435a9ca7f272f0238440b939bc57c78d2385dd1a.zip
Diffstat (limited to 'src/audio/sampman.cpp')
-rw-r--r--src/audio/sampman.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/audio/sampman.cpp b/src/audio/sampman.cpp
index 6dd744c3..7887c363 100644
--- a/src/audio/sampman.cpp
+++ b/src/audio/sampman.cpp
@@ -2221,6 +2221,9 @@ cSampleManager::InitialiseSampleBanks(void)
for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ )
{
+#ifdef FIX_BUGS
+ if (nBank >= MAX_SAMPLEBANKS) break;
+#endif
if ( BankStartOffset[nBank] == BankStartOffset[SAMPLEBANK_MAIN] + i )
{
nSampleBankDiscStartOffset[nBank] = m_aSamples[i].nOffset;