aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-06-01 06:26:11 +0000
committernyamatongwe <unknown>2001-06-01 06:26:11 +0000
commit11b107d831a9d9fddb3544fbe42439415eea00e9 (patch)
tree062e41cdcfb4b14daed708db4ecd9d136fde81b6 /src/CellBuffer.cxx
parent579d7cae6b2e893ee675087666ad51c8fe5f9187 (diff)
downloadscintilla-mirror-11b107d831a9d9fddb3544fbe42439415eea00e9.tar.gz
Some assertions from Mark.
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 56aa15215..10e0a1859 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -751,6 +751,8 @@ bool CellBuffer::SetStyleAt(int position, char style, char mask) {
bool CellBuffer::SetStyleFor(int position, int lengthStyle, char style, char mask) {
int bytePos = position * 2 + 1;
bool changed = false;
+ PLATFORM_ASSERT(lengthStyle == 0 ||
+ (lengthStyle > 0 && lengthStyle + position < length));
while (lengthStyle--) {
char curVal = ByteAt(bytePos);
if ((curVal & mask) != style) {