aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-02-28 22:31:44 +0000
committernyamatongwe <devnull@localhost>2007-02-28 22:31:44 +0000
commitc67fa9076a6c6617bf2a7adea3aab78cbe8a8d5a (patch)
tree7cdfaddbe0c8a3854b21294592adfc8abc44cd58 /src
parent6689f90cf0aade19e4c4c8da73127bb66478388c (diff)
downloadscintilla-mirror-c67fa9076a6c6617bf2a7adea3aab78cbe8a8d5a.tar.gz
Changed ColourTo to assert if asked to style backwards.
In release builds this is ignored instead.
Diffstat (limited to 'src')
-rw-r--r--src/DocumentAccessor.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx
index f3c36db32..e764bfeac 100644
--- a/src/DocumentAccessor.cxx
+++ b/src/DocumentAccessor.cxx
@@ -105,8 +105,9 @@ void DocumentAccessor::StartSegment(unsigned int pos) {
void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) {
// Only perform styling if non empty range
if (pos != startSeg - 1) {
+ PLATFORM_ASSERT(pos >= startSeg);
if (pos < startSeg) {
- Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos);
+ return;
}
if (validLen + (pos - startSeg + 1) >= bufferSize)