aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-09-10 00:37:52 +0000
committernyamatongwe <unknown>2005-09-10 00:37:52 +0000
commited7fc665efb63c38d6bde87d416f1e029e75d4ce (patch)
treeb0d939ec39c33fbd5f89776ff88fcc380f106d8a /src/CellBuffer.cxx
parent08a7c0bb31d4a11edcea9293b3692a3681d7c353 (diff)
downloadscintilla-mirror-ed7fc665efb63c38d6bde87d416f1e029e75d4ce.tar.gz
Added assertions to trap bugs earlier.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r--src/CellBuffer.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 8200d4a59..2e8349481 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -769,6 +769,7 @@ bool CellBuffer::SetStyleFor(int position, int lengthStyle, char style, char mas
const char *CellBuffer::DeleteChars(int position, int deleteLength) {
// InsertString and DeleteChars are the bottleneck though which all changes occur
+ PLATFORM_ASSERT(deleteLength > 0);
char *data = 0;
if (!readOnly) {
if (collectingUndo) {
@@ -875,6 +876,7 @@ void CellBuffer::BasicInsertString(int position, char *s, int insertLength) {
//Platform::DebugPrintf("Inserting at %d for %d\n", position, insertLength);
if (insertLength == 0)
return ;
+ PLATFORM_ASSERT(insertLength > 0);
RoomFor(insertLength);
GapTo(position);