aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/midi')
-rw-r--r--Alc/midi/sf2load.c2
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));