Commit 2504f29a authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix IS ASCII checks. Should be < 0x80 (0100), not < 0x100.

parent 52402fa7
......@@ -82,7 +82,7 @@ LDAP_F (char *) ldap_utf8_strpbrk( const char* str, const char *set);
LDAP_F (char*) ldap_utf8_strtok( char* sp, const char* sep, char **last);
/* Optimizations */
#define LDAP_UTF8_ISASCII(p) ( * (const unsigned char *) (p) < 0x100 )
#define LDAP_UTF8_ISASCII(p) ( * (const unsigned char *) (p) < 0x80 )
#define LDAP_UTF8_CHARLEN(p) ( LDAP_UTF8_ISASCII(p) \
? 1 : ldap_utf8_charlen((p)) )
#define LDAP_UTF8_OFFSET(p) ( LDAP_UTF8_ISASCII(p) \
......
......@@ -29,7 +29,7 @@
#include "ldap_defaults.h"
#undef ISASCII
#define ISASCII(uc) ((uc) < 0x100)
#define ISASCII(uc) ((uc) < 0x80)
/*
* Basic UTF-8 routines
......@@ -264,7 +264,7 @@ int ldap_utf8_copy( char* dst, const char *src )
/*
* UTF-8 ctype routines
* Only deals with characters < 0x100 (ie: US-ASCII)
* Only deals with characters < 0x80 (ie: US-ASCII)
*/
int ldap_utf8_isascii( const char * p )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment