aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2004-01-21 09:08:35 +0000
committernyamatongwe <devnull@localhost>2004-01-21 09:08:35 +0000
commit2517cb60256f7acc7caad759a7723a2256247c65 (patch)
treec0091f20ce42680a4e7b9d37e30fd6e8b32e675f /src
parent3b4321e0bd6090f1e83bf13111d6f6158e49d667 (diff)
downloadscintilla-mirror-2517cb60256f7acc7caad759a7723a2256247c65.tar.gz
Implementation of Allocate.
Diffstat (limited to 'src')
-rw-r--r--src/CellBuffer.cxx4
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;