From b6249fbd78a4baf646d21d539b7980b9c19dd2b5 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 21 Jan 2004 09:08:35 +0000 Subject: Implementation of Allocate. --- src/CellBuffer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3