Explorar el Código

SDL_LoadWAV_IO(): On error, set `*audio_buf` to NULL and `*audio_len` to 0

(cherry picked from commit 23e08f780785fccf30fdd19b775e43b26434f313)
Petar Popovic hace 1 mes
padre
commit
ffa618c00b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/audio/SDL_wave.c

+ 2 - 2
src/audio/SDL_wave.c

@@ -2114,8 +2114,8 @@ bool SDL_LoadWAV_IO(SDL_IOStream *src, bool closeio, SDL_AudioSpec *spec, Uint8
     result = WaveLoad(src, &file, spec, audio_buf, audio_len);
     if (!result) {
         SDL_free(*audio_buf);
-        audio_buf = NULL;
-        audio_len = 0;
+        *audio_buf = NULL;
+        *audio_len = 0;
     }
 
     // Cleanup