aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-15 01:44:29 -0700
committerChris Robinson <[email protected]>2014-05-15 01:44:29 -0700
commita11e1c08580a622acd9367be08171e167eab2a57 (patch)
treee556336d81618b46d9818699ba8828448663cbcb /Alc/mixer.c
parentfdcdda2ed331cbb2390e3813ca8b27e53c091271 (diff)
Ensure that LoopEnd > LoopStart
For the benefit of Clang's static analysis, which doesn't know that a static source will always have a valid buffer and a buffer must have a non-0 loop range.
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index a4712207..fc3fecbd 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -367,6 +367,7 @@ ALvoid MixSource(ALactivesource *src, ALCdevice *Device, ALuint SamplesToDo)
if(Looping && Source->SourceType == AL_STATIC)
{
+ assert(LoopEnd > LoopStart);
DataPosInt = ((DataPosInt-LoopStart)%(LoopEnd-LoopStart)) + LoopStart;
break;
}