diff options
author | Chris Robinson <[email protected]> | 2014-05-04 11:49:13 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-04 11:50:58 -0700 |
commit | 2bc16e9947d02e06330438dd6bf0446133c1f01f (patch) | |
tree | c8bc944dd45af592f7395fab88bbe9e6a449cb53 | |
parent | a48d235ef44b1d91a7cd7d0d5a640c1cc23391d6 (diff) |
Add a cast to silence an MSVC warning
-rw-r--r-- | Alc/midi/sf2load.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c index 0d9bc5cb..2bc94133 100644 --- a/Alc/midi/sf2load.c +++ b/Alc/midi/sf2load.c @@ -50,9 +50,10 @@ static void skip(Reader *stream, ALuint amt) size_t got; got = READ(stream, buf, minu(sizeof(buf), amt)); - if(got == 0) READERR(stream) = 1; + if(got == 0 || got > amt) + READERR(stream) = 1; - amt -= got; + amt -= (ALuint)got; } } |