Fixed bug 3903 - music_wav.c SamplerChunk struct
authorSam Lantinga <slouken@libsdl.org>
Sat, 21 Oct 2017 12:17:37 -0700
changeset 8204bf887d61097
parent 819 17ddbf810d08
child 821 ebb26212a00f
Fixed bug 3903 - music_wav.c SamplerChunk struct

Ozkan Sezer

music_wav.c : SamplerChunk struct has SampleLoop loops[]; as its
last member, ancient gcc fails with it:
music_wav.c:108: field `loops' has incomplete type

Changing it to SampleLoop loops[0] (or SampleLoop loops[1]) makes
it to compile using gcc2.95, if there is interest to support this.
I can't remember how MSVC supports flexible array members.
music_wav.c
     1.1 --- a/music_wav.c	Sat Oct 21 11:38:48 2017 -0700
     1.2 +++ b/music_wav.c	Sat Oct 21 12:17:37 2017 -0700
     1.3 @@ -105,7 +105,7 @@
     1.4      Uint32  SMTPE_offset;
     1.5      Uint32  sample_loops;
     1.6      Uint32  sampler_data;
     1.7 -    SampleLoop loops[];
     1.8 +    SampleLoop loops[0];
     1.9  } SamplerChunk;
    1.10  
    1.11  /*********************************************/