Stop trying to read samples if there was an error
This commit is contained in:
parent
9370fea359
commit
0c31ccd456
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user