diff options
author | Neil <nyamatongwe@gmail.com> | 2025-04-08 09:52:57 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2025-04-08 09:52:57 +1000 |
commit | a50597cb964a00bc4dccfafbda1501a0e14d32b9 (patch) | |
tree | 5df75d13fe1775b8c4ae58221cdc4f05eb18fc73 | |
parent | f80be880e89450ed81f15761d4b2aeee6fb5b0ab (diff) | |
download | scintilla-mirror-a50597cb964a00bc4dccfafbda1501a0e14d32b9.tar.gz |
Fix impossible INTEGER_OVERFLOW warning from Coverity.
-rw-r--r-- | src/Document.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 268755966..b4fa617b2 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -3035,7 +3035,7 @@ Sci::Position Document::BraceMatch(Sci::Position position, Sci::Position /*maxRe // Avoid using MovePositionOutsideChar to check DBCS trail byte unsigned char maxSafeChar = 0xff; if (dbcsCodePage != 0 && dbcsCodePage != CpUtf8) { - maxSafeChar = DBCSMinTrailByte() - 1; + maxSafeChar = std::max<unsigned char>(DBCSMinTrailByte(), 1) - 1; } while ((position >= 0) && (position < LengthNoExcept())) { |