diff options
author | Neil <nyamatongwe@gmail.com> | 2022-02-17 21:55:04 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-02-17 21:55:04 +1100 |
commit | ee6bf8016daed4204b25ed680e9e5b5fab953e33 (patch) | |
tree | 8b53963e69f1e4903a0ba11baa782b745f42b52b /win32/PlatWin.cxx | |
parent | ac99bf8caef4efbff29d031ab04f7e44ab5234d9 (diff) | |
download | scintilla-mirror-ee6bf8016daed4204b25ed680e9e5b5fab953e33.tar.gz |
Add extra condition to avoid Clang-Tidy warning.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 9a41614cd..6a77aab3f 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2548,7 +2548,7 @@ void SurfaceD2D::MeasureWidthsUTF8(const Font *font_, std::string_view text, XYP ui++; PLATFORM_ASSERT(ui < ti); } - for (unsigned int bytePos=0; (bytePos<byteCount) && (i<text.length()); bytePos++) { + for (unsigned int bytePos=0; (bytePos<byteCount) && (i<text.length()) && (ui < tbuf.tlen); bytePos++) { positions[i++] = poses.buffer[ui]; } } |