Commit 254eb67775c786274a52595fbd4430018c3c5b57

Ryan C. Gordon 2019-06-11T02:08:31

windows: Don't let Visual Studio insert an implicit dependency on memset(). Fixes Bugzilla #4662.

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 dfb34f8..577255f 100644
--- a/src/audio/SDL_wave.c
+++ b/src/audio/SDL_wave.c
@@ -1039,7 +1039,7 @@ IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
     int result;
     size_t bytesleft, outputsize;
     WaveChunk *chunk = &file->chunk;
-    ADPCM_DecoderState state = {0};
+    ADPCM_DecoderState state;
     Sint8 *cstate;
 
     if (chunk->size != chunk->length) {
@@ -1056,6 +1056,7 @@ IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
         return 0;
     }
 
+    SDL_zero(state);
     state.channels = file->format.channels;
     state.blocksize = file->format.blockalign;
     state.blockheadersize = (size_t)state.channels * 4;