diff options
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 2 |
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) { |