summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman.cpp
diff options
context:
space:
mode:
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;