Commit cd011bb1e79dd063665a95728a1c98e1a25c4383

Sylvain Becker 2019-06-12T10:42:02

SDL_Wave: missing field 'length' initializer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/audio/SDL_wave.c b/src/audio/SDL_wave.c
index 577255f..6390bec 100644
--- a/src/audio/SDL_wave.c
+++ b/src/audio/SDL_wave.c
@@ -1790,9 +1790,13 @@ WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 **audio_buf,
     SDL_bool RIFFlengthknown = SDL_FALSE;
     WaveFormat *format = &file->format;
     WaveChunk *chunk = &file->chunk;
-    WaveChunk RIFFchunk = {0};
-    WaveChunk fmtchunk = {0};
-    WaveChunk datachunk = {0};
+    WaveChunk RIFFchunk;
+    WaveChunk fmtchunk;
+    WaveChunk datachunk;
+
+    SDL_zero(RIFFchunk);
+    SDL_zero(fmtchunk);
+    SDL_zero(datachunk);
 
     envchunkcountlimit = SDL_getenv("SDL_WAVE_CHUNK_LIMIT");
     if (envchunkcountlimit != NULL) {