From 61117d4e7ba5400f71669ee945982a047bde436d Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 28 May 2011 14:15:41 +0000 Subject: [PATCH] fix crash with RTS playback git-svn-id: https://svn.eduke32.com/eduke32@1898 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/sounds.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index 6e6da5209..a5a5e10de 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -301,13 +301,6 @@ void S_Cleanup(void) { uint32_t num = ldq[--ldnum]; - // num + 65536 is a sound played globally for which there was no open slot to keep track of the voice - if (num >= 65536) - { - g_soundlocks[num-65536]--; - continue; - } - // negative index is RTS playback if ((int32_t)num < 0) { @@ -316,6 +309,13 @@ void S_Cleanup(void) continue; } + // num + 65536 is a sound played globally for which there was no open slot to keep track of the voice + if (num >= 65536) + { + g_soundlocks[num-65536]--; + continue; + } + { int32_t j = num & (MAXSOUNDINSTANCES-1); int32_t i;