From: Kurt Zeilenga Date: Fri, 27 Oct 2000 21:32:46 +0000 (+0000) Subject: Fix UTF-8 5-octet sequences X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1675 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=907cd90607c15e418bbdfa32657ed9d53d3a8ae9;p=openldap Fix UTF-8 5-octet sequences --- diff --git a/libraries/libldap/utf-8.c b/libraries/libldap/utf-8.c index 70734d7504..9ff563a27d 100644 --- a/libraries/libldap/utf-8.c +++ b/libraries/libldap/utf-8.c @@ -161,7 +161,7 @@ int ldap_ucs4_to_utf8( ldap_ucs4_t c, char *buf ) p[len++] = 0x80 | ( (c >> 6) & 0x3f ); p[len++] = 0x80 | ( c & 0x3f ); - } else if( c < 0x400000 ) { + } else if( c < 0x4000000 ) { p[len++] = 0xf8 | ( c >> 24 ); p[len++] = 0x80 | ( (c >> 18) & 0x3f ); p[len++] = 0x80 | ( (c >> 12) & 0x3f );