From 771eb1a62561091e925bc723f42d03e849b02a40 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 26 Nov 2014 02:05:40 +0100 Subject: [PATCH] Disregard whitespaces in confusable name comparison --- src/base/system.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/base/system.c b/src/base/system.c index 9c2eab980..2f24753ec 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -2061,8 +2061,18 @@ int str_utf8_comp_names(const char *a, const char *b) while(*a && *b) { - codeA = str_utf8_decode(&a); - codeB = str_utf8_decode(&b); + do + { + codeA = str_utf8_decode(&a); + } + while(*a && !str_utf8_isspace(codeA)); + + do + { + codeB = str_utf8_decode(&b); + } + while(*b && !str_utf8_isspace(codeB)); + diff = codeA - codeB; if((diff < 0 && !str_utf8_is_confusable(codeA, codeB))