diff options
author | nyamatongwe <unknown> | 2003-01-13 10:23:26 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-01-13 10:23:26 +0000 |
commit | a02d4c8e5a6f514a27875c634035491d52565e9f (patch) | |
tree | 49bb3557242e5c88e2140db347f0ef9f35713995 | |
parent | 84af7c9bf2bb053710de2326351bf985dc883d00 (diff) | |
download | scintilla-mirror-a02d4c8e5a6f514a27875c634035491d52565e9f.tar.gz |
DBCSCharLength always returns >= 1 as that makes it much easier to use.
-rw-r--r-- | gtk/PlatGTK.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index abcc0d486..7088a5f7e 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1697,8 +1697,12 @@ bool Platform::IsDBCSLeadByte(int /*codePage*/, char /*ch*/) { return false; } -int Platform::DBCSCharLength(int codePage, const char *s) { - return mblen(s, MB_CUR_MAX) +int Platform::DBCSCharLength(int /*codePage*/, const char *s) { + int bytes = mblen(s, MB_CUR_MAX); + if (bytes >= 1) + return bytes; + else + return 1; } int Platform::DBCSCharMaxLength() { |