aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-09-21 14:41:43 -0700
committerChris Robinson <[email protected]>2010-09-21 14:41:43 -0700
commit301a8ba3a403ece650790d015995a56f27718115 (patch)
tree93209e28addade1840459e18624ea0639fa17b2e /OpenAL32/alSource.c
parent2d4453968d67af5cfee81c09adcc7b1ac6bd03f6 (diff)
Improve some range checks
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index c9051793..32e8c4da 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -62,7 +62,7 @@ AL_API ALvoid AL_APIENTRY alGenSources(ALsizei n,ALuint *sources)
if(!IsBadWritePtr((void*)sources, n * sizeof(ALuint)))
{
// Check that the requested number of sources can be generated
- if((Context->SourceMap.size + n) <= (ALsizei)Device->MaxNoOfSources)
+ if((ALuint)n <= Device->MaxNoOfSources - Context->SourceMap.size)
{
ALenum err;