diff options
Diffstat (limited to 'src/client/snd_wavelet.c')
-rw-r--r-- | src/client/snd_wavelet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/snd_wavelet.c b/src/client/snd_wavelet.c index 1355fcbe..51624614 100644 --- a/src/client/snd_wavelet.c +++ b/src/client/snd_wavelet.c @@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA void daub4(float b[], unsigned long n, int isign) { - float wksp[4097]; + float wksp[4097] = { 0.0f }; float *a=b-1; // numerical recipies so a[1] = b[0] unsigned long nh,nh1,i,j; @@ -147,7 +147,7 @@ void encodeWavelet( sfx_t *sfx, short *packets) { newchunk = SND_malloc(); if (sfx->soundData == NULL) { sfx->soundData = newchunk; - } else { + } else if (chunk != NULL) { chunk->next = newchunk; } chunk = newchunk; @@ -216,7 +216,7 @@ void encodeMuLaw( sfx_t *sfx, short *packets) { newchunk = SND_malloc(); if (sfx->soundData == NULL) { sfx->soundData = newchunk; - } else { + } else if (chunk != NULL) { chunk->next = newchunk; } chunk = newchunk; |