fix crash with RTS playback

git-svn-id: https://svn.eduke32.com/eduke32@1898 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-05-28 14:15:41 +00:00
parent 5a7183ab79
commit 61117d4e7b

View file

@ -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;