mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
Fix IS ASCII checks. Should be < 0x80 (0100), not < 0x100.
This commit is contained in:
parent
52402fa752
commit
2504f29a0c
2 changed files with 3 additions and 3 deletions
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Reference in a new issue