summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Buffer.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Buffer.cc b/src/Buffer.cc
index e029df5..f276ec0 100644
--- a/src/Buffer.cc
+++ b/src/Buffer.cc
@@ -38,12 +38,16 @@ ssize_t Balau::Buffer::write(const void * buf, size_t count) throw (GeneralExcep
if (endBlock > oldEndBlock) {
m_buffer = (uint8_t *) realloc(m_buffer, endBlock * s_blockSize);
memset(m_buffer + oldEndBlock * s_blockSize, 0, (endBlock - oldEndBlock) * s_blockSize);
+ m_numBlocks = endBlock;
}
memcpy(m_buffer + cursor, buf, count);
wseek(cursor + count);
+ if (m_bufSize < end)
+ m_bufSize = end;
+
return count;
}