aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2002-10-08 09:53:35 +0000
committernyamatongwe <devnull@localhost>2002-10-08 09:53:35 +0000
commit6ccab9e1f5eead5609e4ca9ccf44f54f7551feca (patch)
treebe2f0ee42add594d2d3f4aea6aed1f84c9ca3721 /src/CellBuffer.cxx
parent937d377309a53598efbcfab92641db6edbbbf92c (diff)
downloadscintilla-mirror-6ccab9e1f5eead5609e4ca9ccf44f54f7551feca.tar.gz
Extra safety by anding mask into styles being set.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r--src/CellBuffer.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 420dee6ff..8f292869d 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -739,6 +739,7 @@ void CellBuffer::InsertCharStyle(int position, char ch, char style) {
}
bool CellBuffer::SetStyleAt(int position, char style, char mask) {
+ style &= mask;
char curVal = ByteAt(position * 2 + 1);
if ((curVal & mask) != style) {
SetByteAt(position*2 + 1, static_cast<char>((curVal & ~mask) | style));