diff options
author | Chris Robinson <[email protected]> | 2014-07-19 20:46:12 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-19 20:46:12 -0700 |
commit | 0c31ccd45668c0d0295efd0cca548cb58c08ea95 (patch) | |
tree | c3be19c7ab9d9951eefb81005b2082b9597c4b1f /Alc/midi | |
parent | 9370fea3596d5daadc6f460db955db45749b14f7 (diff) |
Stop trying to read samples if there was an error
Diffstat (limited to 'Alc/midi')
-rw-r--r-- | Alc/midi/sf2load.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index 670f4ee9..233f7983 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -1120,7 +1120,7 @@ ALboolean loadSf2(Reader *stream, ALsoundfont *soundfont, ALCcontext *context) else { ALuint total = 0; - while(total < smpl.mSize) + while(total < smpl.mSize && !READERR(stream)) { ALbyte buf[4096]; ALuint todo = minu(smpl.mSize-total, sizeof(buf)); |