SDL_audiotypecvt.c: Fixed memory corruption when resampling S16 t F32

(cherry picked from commit ca01016577)
This commit is contained in:
Wohlstand authored and Sam Lantinga committed 2024-02-03 06:14:37 -08:00
1 parent 2f2b44a1bd
commit 384fcea585
1 file changed
+1 -1
+1 -1
View File
@@ -125,7 +125,7 @@ static void SDLCALL SDL_Convert_U8_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFor
static void SDLCALL SDL_Convert_S16_to_F32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
{
const int num_samples = cvt->len_cvt;
const int num_samples = cvt->len_cvt / sizeof(Sint16);
const Sint16 *src = (const Sint16 *)cvt->buf;
float *dst = (float *)cvt->buf;
int i;