diff options
| author | nyamatongwe <unknown> | 2007-02-28 22:31:44 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2007-02-28 22:31:44 +0000 | 
| commit | 1d40ef24ad4828ca3b954cb98cf582c466d2adb3 (patch) | |
| tree | 7cdfaddbe0c8a3854b21294592adfc8abc44cd58 | |
| parent | ab5b20104e5589f0c47b4e1c59f56aae8ba1f763 (diff) | |
| download | scintilla-mirror-1d40ef24ad4828ca3b954cb98cf582c466d2adb3.tar.gz | |
Changed ColourTo to assert if asked to style backwards.
In release builds this is ignored instead.
| -rw-r--r-- | src/DocumentAccessor.cxx | 3 | 
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) | 
