diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 2ebe1a759..59e2678ab 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4147,7 +4147,7 @@ void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { if (treatAsDBCS) { NotifyChar((static_cast<unsigned char>(s[0]) << 8) | static_cast<unsigned char>(s[1])); - } else { + } else if (len > 0) { int byte = static_cast<unsigned char>(s[0]); if ((byte < 0xC0) || (1 == len)) { // Handles UTF-8 characters between 0x01 and 0x7F and single byte |