--On September 30, 2008 11:18:04 AM +0000 h.b.furuseth(a)usit.uio.no wrote:
> quanah(a)OpenLDAP.org writes:
>> utf-8.c:char * (ldap_utf8_strchr)( const char *str, const char *chr )
>>
>> I.e., string, character, as normal libc functions.
>>
>> However, at line 125 in charray.c, it is called as:
>> if ( ldap_utf8_strchr( brkstr, s ) != NULL ) {
>> This order appears to be incorrect.
>
> No. That code counts the number of delimiters characters in the
> string being split. Since brkstr can contain several characters,
> the loop checks each "utf-8 character" in str against brkstr.
Yes. The calling order was incorrect. It is supposed to be
ldap_utf8_strchr(s, brkstr). Also the outside loop was incorrect.
--Quanah
--
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration