Преглед изворни кода

SDL_ConvertAudioSamples: Make sure we got enough data

Brick пре 2 година
родитељ
комит
5e985b72dc
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/audio/SDL_audiocvt.c

+ 1 - 1
src/audio/SDL_audiocvt.c

@@ -1102,7 +1102,7 @@ int SDL_ConvertAudioSamples(const SDL_AudioSpec *src_spec, const Uint8 *src_data
             if (dstlen >= 0) {
                 dst = (Uint8 *)SDL_malloc(dstlen);
                 if (dst) {
-                    retval = (SDL_GetAudioStreamData(stream, dst, dstlen) >= 0) ? 0 : -1;
+                    retval = (SDL_GetAudioStreamData(stream, dst, dstlen) == dstlen) ? 0 : -1;
                 }
             }
         }