diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 7afe10701..3fd9ce1a9 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2265,9 +2265,10 @@ Sci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, con if (widthChar == 1) { characterMatches = searchThing[indexSearch] == MakeLowerCase(leadByte); } else { - char bytes[maxBytesCharacter + 1]; - bytes[0] = leadByte; - bytes[1] = cbView.CharAt(pos + indexDocument + 1); + const char bytes[maxBytesCharacter + 1] { + static_cast<char>(leadByte), + cbView.CharAt(pos + indexDocument + 1) + }; char folded[maxBytesCharacter * maxFoldingExpansion + 1]; lenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar); // memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing |