fixed: color spill issue

This commit is contained in:
daboe01
2026-06-20 10:40:46 +02:00
parent 15bbca8d77
commit 26b2280fc2
+8 -3
View File
@@ -797,10 +797,15 @@ var kRgsymRtf = {
[self _flushCurrentRun];
var fontIndex = parseInt(param) - 1;
if (_currentRun && fontIndex >= 0)
_currentRun.fgColour = _colorArray[fontIndex];
if (_currentRun)
{
if (fontIndex >= 0 && fontIndex < _colorArray.length)
_currentRun.fgColour = _colorArray[fontIndex];
else
_currentRun.fgColour = nil;
}
break;
break;
case "cb": // change background color
case "highlight":