Fix crash in AudioConvertByteswap

main
capehill 2023-06-28 21:25:01 +03:00 committed by Ryan C. Gordon
parent fd6cb4dc86
commit 8315a00a01
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ static void AudioConvertByteswap(void *dst, const void *src, int num_samples, in
case b: { \ case b: { \
const Uint##b *tsrc = (const Uint##b *)src; \ const Uint##b *tsrc = (const Uint##b *)src; \
Uint##b *tdst = (Uint##b *)dst; \ Uint##b *tdst = (Uint##b *)dst; \
for (i = num_samples; i; i++) { \ for (i = 0; i < num_samples; i++) { \
tdst[i] = SDL_Swap##b(tsrc[i]); \ tdst[i] = SDL_Swap##b(tsrc[i]); \
} \ } \
break; \ break; \