summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Buffer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Buffer.cc b/src/Buffer.cc
index a958571..25639b7 100644
--- a/src/Buffer.cc
+++ b/src/Buffer.cc
@@ -60,7 +60,8 @@ ssize_t Balau::Buffer::write(const void * buf, size_t count) throw (GeneralExcep
}
void Balau::Buffer::reset() {
- m_buffer = (uint8_t *) realloc(m_buffer, 0);
+ if (!m_fromConst)
+ m_buffer = (uint8_t *) realloc(m_buffer, 0);
m_bufSize = 0;
m_numBlocks = 0;
wseek(0);