audio: Fixed incorrect pointer in SDL_ResampleCVT_si16_c2().
authorRyan C. Gordon <icculus@icculus.org>
Mon, 23 Jan 2017 16:42:47 -0500
changeset 1083964f7fccca56e
parent 10838 57ac8b68d7c8
child 10840 3c3708a0b217
audio: Fixed incorrect pointer in SDL_ResampleCVT_si16_c2().

Forgot to update this when we changed this to process in-place. Whoops!
src/audio/SDL_audiocvt.c
     1.1 --- a/src/audio/SDL_audiocvt.c	Mon Jan 23 12:14:28 2017 -0500
     1.2 +++ b/src/audio/SDL_audiocvt.c	Mon Jan 23 16:42:47 2017 -0500
     1.3 @@ -371,8 +371,8 @@
     1.4  {
     1.5      const Sint16 *src = (const Sint16 *) cvt->buf;
     1.6      const int srclen = cvt->len_cvt;
     1.7 -    Sint16 *dst = (Sint16 *) (cvt->buf + srclen);
     1.8 -    const int dstlen = (cvt->len * cvt->len_mult) - srclen;
     1.9 +    Sint16 *dst = (Sint16 *) cvt->buf;
    1.10 +    const int dstlen = (cvt->len * cvt->len_mult);
    1.11      Sint16 state[2] = { src[0], src[1] };
    1.12  
    1.13      SDL_assert(format == AUDIO_S16SYS);