diff options
author | MAN-AT-ARMS <donny@ecgnetwork.com> | 2014-09-09 11:30:23 -0400 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2015-03-17 11:38:37 +0000 |
commit | fa24963ceff0563f59ed363049861216f624058f (patch) | |
tree | 085c9fb2ab89194919e83f141a157b01d415a2d8 | |
parent | 47af8629c6d028b1095e29e45f27c44368d1a74d (diff) |
Fix possible division by zero in S_PaintChannelFrom16_altivec
-rw-r--r-- | src/client/snd_mix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/snd_mix.c b/src/client/snd_mix.c index 56ef7185..6671fc47 100644 --- a/src/client/snd_mix.c +++ b/src/client/snd_mix.c @@ -237,6 +237,10 @@ static void S_PaintChannelFrom16_altivec( channel_t *ch, const sfx_t *sc, int co short *samples; float ooff, fdata[2], fdiv, fleftvol, frightvol; + if (sc->soundChannels <= 0) { + return; + } + samp = &paintbuffer[ bufferOffset ]; if (ch->doppler) { |