diff options
author | nyamatongwe <devnull@localhost> | 2003-01-13 10:23:26 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2003-01-13 10:23:26 +0000 |
commit | af65f500483de01136b1fcbaa0f617507e54bf1d (patch) | |
tree | 49bb3557242e5c88e2140db347f0ef9f35713995 | |
parent | 2a92a28fc51c654890e0d44c19f923a43f2aaba0 (diff) | |
download | scintilla-mirror-af65f500483de01136b1fcbaa0f617507e54bf1d.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() { |