diff options
author | Neil <nyamatongwe@gmail.com> | 2022-12-09 18:04:32 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-12-09 18:04:32 +1100 |
commit | e0810b184575a5b44d09cb83493968311a9ca58f (patch) | |
tree | 1bbae81c2993ea727df8d74b461df19520723160 | |
parent | 1c56d4698f60e82c2f7c0a0a9a7d2a9ae1efdce4 (diff) | |
download | scintilla-mirror-e0810b184575a5b44d09cb83493968311a9ca58f.tar.gz |
Use const. Replace magic number with constant.
-rw-r--r-- | src/Editor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index ca2868dc8..9a98b470c 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5870,8 +5870,8 @@ void Editor::StyleSetMessage(Message iMessage, uptr_t wParam, sptr_t lParam) { const int classified = UTF8Classify(utf8); if (!(classified & UTF8MaskInvalid)) { // valid UTF-8 - int len = classified & UTF8MaskWidth; - for (int i=0; i<len && i<4; i++) + const int len = classified & UTF8MaskWidth; + for (int i=0; i<len && i<UTF8MaxBytes; i++) *rep++ = *utf8++; } *rep = 0; |