summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-03-31 10:26:08 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-03-31 10:52:42 +1100
commit46db53b1596cccdd22cf44dc376e39601f01c29c (patch)
tree2b287d0229071c7f2dea26e0e2296a6e9b17c192 /lib/util
parent0e46e09122b43ff237ca45173129813a875767bd (diff)
downloadsamba-46db53b1596cccdd22cf44dc376e39601f01c29c.tar.gz
samba-46db53b1596cccdd22cf44dc376e39601f01c29c.tar.bz2
samba-46db53b1596cccdd22cf44dc376e39601f01c29c.zip
lib/util/charset correct calculation of UTF8 character sizes
Characters between 0x800 0x0FFFF are 3 bytes long. Andrew Bartlett
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/charset/util_str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/charset/util_str.c b/lib/util/charset/util_str.c
index 30961d068a..ff53b1875e 100644
--- a/lib/util/charset/util_str.c
+++ b/lib/util/charset/util_str.c
@@ -184,7 +184,7 @@ _PUBLIC_ size_t strlen_m_ext(const char *s, charset_t src_charset, charset_t dst
count += 1;
} else if (c < 0x800) {
count += 2;
- } else if (c < 0x1000) {
+ } else if (c < 0x10000) {
count += 3;
} else {
count += 4;