fix assertion

This commit is contained in:
Pierangelo Masarati 2002-01-16 10:58:04 +00:00
parent 457b00bf0f
commit 5c1d9b4fce

View 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