From: Mark Adamson Date: Fri, 3 Nov 2000 16:16:27 +0000 (+0000) Subject: Improve handling of initials in approximate search strings. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1660 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=caf384a37ce906062cdb120a2ed0f34369e4cbe3;p=openldap Improve handling of initials in approximate search strings. --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 1f2c29eaa4..2e46cac040 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -788,17 +788,21 @@ approxMatch( len = 0; while ( nextchunk < ((struct berval *)assertedValue)->bv_len ) { len = strcspn( assertv + nextchunk, SLAPD_APPROX_DELIMITER); + if( len == 0 ) { + nextchunk++; + continue; + } #if defined(SLAPD_APPROX_INITIALS) - if( len <= 1 ) { + else if( len == 1 ) { /* Single letter words need to at least match one word's initial */ for( i=nextavail; i