]> git.sur5r.net Git - openldap/commitdiff
fix assertion
authorPierangelo Masarati <ando@openldap.org>
Wed, 16 Jan 2002 10:58:04 +0000 (10:58 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 16 Jan 2002 10:58:04 +0000 (10:58 +0000)
libraries/libldap/getdn.c

index c0f0273327838173f892832d53be7f0025d99c23..91eb163b82b7e7b5895ccb0d2abc61202e1a624d 100644 (file)
@@ -1988,9 +1988,10 @@ strval2str( struct berval *val, char *str, unsigned flags, ber_len_t *len )
                
                /*
                 * The length was checked in strval2strlen();
+                * LDAP_UTF8_CHARLEN() should suffice
                 */
-               assert( LDAP_UTF8_CHARLEN2( &val->bv_val[ s ], cl ) > 0 );
-               cl = LDAP_UTF8_CHARLEN( &val->bv_val[ s ] );
+               cl = LDAP_UTF8_CHARLEN2( &val->bv_val[ s ], cl );
+               assert( cl > 0 );
                
                /* 
                 * there might be some chars we want to escape in form