From: havoc Date: Sun, 10 Apr 2011 16:00:21 +0000 (+0000) Subject: don't infinite loop if a sound has total_length 0 X-Git-Tag: xonotic-v0.5.0~280 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=57eb86d3c5d90014bfe9372edbeb1998b0bef73d;p=xonotic%2Fdarkplaces.git don't infinite loop if a sound has total_length 0 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11046 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=381deb3d52c866c59a6925b4d64fa780415363f1 --- diff --git a/snd_mix.c b/snd_mix.c index 9094ce6c..05abc83a 100644 --- a/snd_mix.c +++ b/snd_mix.c @@ -503,6 +503,8 @@ void S_MixToBuffer(void *stream, unsigned int bufferframes) continue; if (ch->flags & CHANNELFLAG_PAUSED) continue; + if (!sfx->total_length) + continue; ltime = 0; if (ch->pos < 0)