aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-08-05 20:51:30 -0700
committerChris Robinson <[email protected]>2008-08-05 20:51:30 -0700
commit453b01522511b6caadad909e9fee6975ea3477cd (patch)
treec84e2d6b25c0abeab5d4d8467951322bb1fdf9ff /Alc/ALu.c
parentc1cf9ae8f6afdea81f1adc84cde628062ff6c6d9 (diff)
Prevent a 0 or negative increment for the buffer position
Thanks to Christopher Fitzgerald for pointing these last two problems out
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 309035dd..2c5cde40 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -709,6 +709,8 @@ ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum forma
increment = (ALint)(Pitch*(ALfloat)(1L<<FRACTIONBITS));
if(increment > (MAX_PITCH<<FRACTIONBITS))
increment = (MAX_PITCH<<FRACTIONBITS);
+ else if(increment <= 0)
+ increment = (1<<FRACTIONBITS);
//Figure out how many samples we can mix.
DataSize64 = DataSize;