diff options
Diffstat (limited to '')
-rw-r--r-- | src/outputBuffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c index ad584c8c8..48e9598f6 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -188,7 +188,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, chunk = outputBufferGetChunk(cb, chunk_index); - chunkLeft = CHUNK_SIZE - chunk->chunkSize; + chunkLeft = sizeof(chunk->data) - chunk->chunkSize; dataToSend = datalen > chunkLeft ? chunkLeft : datalen; memcpy(chunk->data + chunk->chunkSize, data, dataToSend); @@ -196,7 +196,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, datalen -= dataToSend; data += dataToSend; - if (chunk->chunkSize == CHUNK_SIZE) { + if (chunk->chunkSize == sizeof(chunk->data)) { flushOutputBuffer(cb); } } |