aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-01-11 10:58:33 -0800
committerChris Robinson <[email protected]>2010-01-11 10:58:33 -0800
commitab2eb5a60373fda56bcc65e3a82686994a315767 (patch)
tree7e9390c518cd57689e2c5d6ce65e9110e190be3a
parent3d7f925d521ec8b456d60583b84ac2f97b21059a (diff)
Check buffer size when copying padding instead of the data pointer
-rw-r--r--Alc/ALu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 53aaba3b..15957232 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1025,7 +1025,7 @@ another_source:
if(BufferListItem->next)
{
ALbuffer *NextBuf = BufferListItem->next->buffer;
- if(NextBuf && NextBuf->data)
+ if(NextBuf && NextBuf->size)
{
ALint ulExtraSamples = BUFFER_PADDING*Channels*Bytes;
ulExtraSamples = min(NextBuf->size, ulExtraSamples);
@@ -1035,7 +1035,7 @@ another_source:
else if(ALSource->bLooping)
{
ALbuffer *NextBuf = ALSource->queue->buffer;
- if(NextBuf && NextBuf->data)
+ if(NextBuf && NextBuf->size)
{
ALint ulExtraSamples = BUFFER_PADDING*Channels*Bytes;
ulExtraSamples = min(NextBuf->size, ulExtraSamples);