aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-04 11:49:13 -0700
committerChris Robinson <[email protected]>2014-05-04 11:50:58 -0700
commit2bc16e9947d02e06330438dd6bf0446133c1f01f (patch)
treec8bc944dd45af592f7395fab88bbe9e6a449cb53 /Alc
parenta48d235ef44b1d91a7cd7d0d5a640c1cc23391d6 (diff)
Add a cast to silence an MSVC warning
Diffstat (limited to 'Alc')
-rw-r--r--Alc/midi/sf2load.c5
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;
}
}