diff options
-rw-r--r-- | Alc/midi/sf2load.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index 1a5a12cc..70f7b7fc 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -568,7 +568,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->phdr[i].mZoneIdx, sfont->pbag_size); return AL_FALSE; } - if(sfont->phdr[i].mZoneIdx > sfont->phdr[i+1].mZoneIdx) + if(sfont->phdr[i+1].mZoneIdx < sfont->phdr[i].mZoneIdx) { WARN("Preset %d has invalid zone index (%d does not follow %d)\n", i+1, sfont->phdr[i+1].mZoneIdx, sfont->phdr[i].mZoneIdx); @@ -590,7 +590,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->pbag[i].mGenIdx, sfont->pgen_size); return AL_FALSE; } - if(sfont->pbag[i].mGenIdx > sfont->pbag[i+1].mGenIdx) + if(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); @@ -602,7 +602,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->pbag[i].mModIdx, sfont->pmod_size); return AL_FALSE; } - if(sfont->pbag[i].mModIdx > sfont->pbag[i+1].mModIdx) + if(sfont->pbag[i+1].mModIdx < sfont->pbag[i].mModIdx) { WARN("Preset zone %d has invalid modulator index (%d does not follow %d)\n", i+1, sfont->pbag[i+1].mModIdx, sfont->pbag[i].mModIdx); @@ -627,11 +627,11 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) { if(sfont->inst[i].mZoneIdx >= sfont->ibag_size) { - WARN("Instrument %d has invalid zone index %d (max: %d)\n", i+1, + WARN("Instrument %d has invalid zone index %d (max: %d)\n", i, sfont->inst[i].mZoneIdx, sfont->ibag_size); return AL_FALSE; } - if(sfont->inst[i].mZoneIdx > sfont->inst[i+1].mZoneIdx) + if(sfont->inst[i+1].mZoneIdx < sfont->inst[i].mZoneIdx) { WARN("Instrument %d has invalid zone index (%d does not follow %d)\n", i+1, sfont->inst[i+1].mZoneIdx, sfont->inst[i].mZoneIdx); @@ -640,7 +640,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) } if(sfont->inst[i].mZoneIdx >= sfont->ibag_size) { - WARN("Instrument %d has invalid zone index %d (max: %d)\n", i+1, + WARN("Instrument %d has invalid zone index %d (max: %d)\n", i, sfont->inst[i].mZoneIdx, sfont->ibag_size); return AL_FALSE; } @@ -653,7 +653,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->ibag[i].mGenIdx, sfont->igen_size); return AL_FALSE; } - if(sfont->ibag[i].mGenIdx > sfont->ibag[i+1].mGenIdx) + if(sfont->ibag[i+1].mGenIdx < sfont->ibag[i].mGenIdx) { WARN("Instrument zone %d has invalid generator index (%d does not follow %d)\n", i+1, sfont->ibag[i+1].mGenIdx, sfont->ibag[i].mGenIdx); @@ -665,7 +665,7 @@ static ALboolean ensureFontSanity(const Soundfont *sfont, ALboolean has_irom) sfont->ibag[i].mModIdx, sfont->imod_size); return AL_FALSE; } - if(sfont->ibag[i].mModIdx > sfont->ibag[i+1].mModIdx) + if(sfont->ibag[i+1].mModIdx < sfont->ibag[i].mModIdx) { WARN("Instrument zone %d has invalid modulator index (%d does not follow %d)\n", i+1, sfont->ibag[i+1].mModIdx, sfont->ibag[i].mModIdx); |