diff options
author | nyamatongwe <unknown> | 2004-01-21 09:08:35 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2004-01-21 09:08:35 +0000 |
commit | b6249fbd78a4baf646d21d539b7980b9c19dd2b5 (patch) | |
tree | c0091f20ce42680a4e7b9d37e30fd6e8b32e675f /src | |
parent | ea2e7c10cc227cee9f939d38116c1cd3608d7a1b (diff) | |
download | scintilla-mirror-b6249fbd78a4baf646d21d539b7980b9c19dd2b5.tar.gz |
Implementation of Allocate.
Diffstat (limited to 'src')
-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; |