diff options
Diffstat (limited to 'lexlib')
-rw-r--r-- | lexlib/LexAccessor.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lexlib/LexAccessor.h b/lexlib/LexAccessor.h index 87557d8c1..e1043c05f 100644 --- a/lexlib/LexAccessor.h +++ b/lexlib/LexAccessor.h @@ -157,13 +157,14 @@ public: if (validLen + (pos - startSeg + 1) >= bufferSize) Flush(); + char attr = static_cast<char>(chAttr); if (validLen + (pos - startSeg + 1) >= bufferSize) { // Too big for buffer so send directly - pAccess->SetStyleFor(pos - startSeg + 1, static_cast<char>(chAttr)); + pAccess->SetStyleFor(pos - startSeg + 1, attr); } else { for (Sci_PositionU i = startSeg; i <= pos; i++) { assert((startPosStyling + validLen) < Length()); - styleBuf[validLen++] = static_cast<char>(chAttr); + styleBuf[validLen++] = attr; } } } |