diff options
author | Chris Robinson <[email protected]> | 2010-01-11 10:58:33 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-01-11 10:58:33 -0800 |
commit | ab2eb5a60373fda56bcc65e3a82686994a315767 (patch) | |
tree | 7e9390c518cd57689e2c5d6ce65e9110e190be3a /Alc/ALu.c | |
parent | 3d7f925d521ec8b456d60583b84ac2f97b21059a (diff) |
Check buffer size when copying padding instead of the data pointer
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |