From 8bfcb31b0e01d42532db5837b1f0a070eb076bb1 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 15 Sep 2005 23:06:57 +0000 Subject: r10250: the comparison is caseless so we must caseless subtract otherwise we get the wrong result when comparing upper case chars with lower case chars (This used to be commit f6ea6e9382f954be819ec82e28598cdf9cf88661) --- source4/lib/ldb/common/attrib_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/ldb') diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c index 412146360c..61ca566570 100644 --- a/source4/lib/ldb/common/attrib_handlers.c +++ b/source4/lib/ldb/common/attrib_handlers.c @@ -138,7 +138,7 @@ static int ldb_comparison_fold(struct ldb_context *ldb, void *mem_ctx, } while (*s1 == ' ') s1++; while (*s2 == ' ') s2++; - return (int)(*s1) - (int)(*s2); + return (int)(toupper(*s1)) - (int)(toupper(*s2)); } /* -- cgit