From 6ccab9e1f5eead5609e4ca9ccf44f54f7551feca Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 8 Oct 2002 09:53:35 +0000 Subject: Extra safety by anding mask into styles being set. --- src/CellBuffer.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src/CellBuffer.cxx') 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((curVal & ~mask) | style)); -- cgit v1.2.3