]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/charray.c
ITS#6254
[openldap] / libraries / libldap / charray.c
index b679f75d835209c974b2bf0f2634eaa2c8b1cd53..6692428182765c39507db52a996e58a38f717c59 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -191,8 +191,8 @@ ldap_str2charray( const char *str_in, const char *brkstr )
        }
 
        i = 1;
-       for ( s = str; *s; LDAP_UTF8_INCR(s) ) {
-               s = ldap_utf8_strchr( s, brkstr );
+       for ( s = str; ; LDAP_UTF8_INCR(s) ) {
+               s = ldap_utf8_strpbrk( s, brkstr );
                if ( !s ) break;
                i++;
        }