aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp
index 38c4ff54..b9989d5d 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -2067,9 +2067,10 @@ START_API_FUNC
std::unique_lock<std::mutex> srclock{context->mSourceLock};
ALCdevice *device{context->mDevice.get()};
- if(static_cast<ALuint>(n) >= device->SourcesMax-context->mNumSources)
+ if(static_cast<ALuint>(n) > device->SourcesMax-context->mNumSources)
{
- context->setError(AL_OUT_OF_MEMORY, "Exceeding %u source limit", device->SourcesMax);
+ context->setError(AL_OUT_OF_MEMORY, "Exceeding %u source limit (%u + %d)",
+ device->SourcesMax, context->mNumSources, n);
return;
}
if(!EnsureSources(context.get(), static_cast<ALuint>(n)))