diff options
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index f6c1f7b17..27e62ac61 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -782,10 +782,10 @@ int CellBuffer::Length() { } void CellBuffer::Allocate(int newSize) { - if (newSize > size) { + if (newSize > length) { GapTo(length); char *newBody = new char[newSize]; - memcpy(newBody, body, size); + memcpy(newBody, body, length); delete []body; body = newBody; gaplen += newSize - size; |