diff options
author | Chris Robinson <[email protected]> | 2014-07-01 19:43:20 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-01 19:43:20 -0700 |
commit | 56bb8689d4d4735aa79c71d41a0e87857dbece1c (patch) | |
tree | e70cddeddb08e4a652c77a7c4f9932866ab59f6e | |
parent | 3c6752e76521cf8c2437c01377dcf354ca080196 (diff) |
Fix preset zone instrument header check
-rw-r--r-- | Alc/midi/sf2load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index 0245e27e..ee029b2a 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -296,7 +296,7 @@ static void Soundfont_Destruct(Soundfont *self) } -#define FOURCC(a,b,c,d) (((d)<<24) | ((c)<<16) | ((b)<<8) | (a)) +#define FOURCC(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) #define FOURCCARGS(x) (char)((x)&0xff), (char)(((x)>>8)&0xff), (char)(((x)>>16)&0xff), (char)(((x)>>24)&0xff) typedef struct RiffHdr { ALuint mCode; @@ -500,7 +500,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont) sfont->pbag[i].mGenIdx, sfont->pgen_size); return AL_FALSE; } - if(i+1 < sfont->pbag_size && sfont->pbag[i].mGenIdx < sfont->pbag[i].mGenIdx) + if(i+1 < sfont->pbag_size && sfont->pbag[i+1].mGenIdx < sfont->pbag[i].mGenIdx) { WARN("Preset zone %d has invalid generator index (%d does not follow %d)\n", i+1, sfont->pbag[i+1].mGenIdx, sfont->pbag[i].mGenIdx); |