From caf384a37ce906062cdb120a2ed0f34369e4cbe3 Mon Sep 17 00:00:00 2001 From: Mark Adamson Date: Fri, 3 Nov 2000 16:16:27 +0000 Subject: [PATCH] Improve handling of initials in approximate search strings. --- servers/slapd/schema_init.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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