diff options
author | nyamatongwe <unknown> | 2002-10-08 09:53:35 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-10-08 09:53:35 +0000 |
commit | 4ef103f0943b6dde707c037cbf7dc5136fbbef84 (patch) | |
tree | be2f0ee42add594d2d3f4aea6aed1f84c9ca3721 /src/CellBuffer.cxx | |
parent | e38e26d27d76b6b6eb997b08c9deb823cef8b8cd (diff) | |
download | scintilla-mirror-4ef103f0943b6dde707c037cbf7dc5136fbbef84.tar.gz |
Extra safety by anding mask into styles being set.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 1 |
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)); |