mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
Disregard whitespaces in confusable name comparison
This commit is contained in:
parent
c1fd694c14
commit
771eb1a625
|
@ -2060,9 +2060,19 @@ int str_utf8_comp_names(const char *a, const char *b)
|
||||||
int diff;
|
int diff;
|
||||||
|
|
||||||
while(*a && *b)
|
while(*a && *b)
|
||||||
|
{
|
||||||
|
do
|
||||||
{
|
{
|
||||||
codeA = str_utf8_decode(&a);
|
codeA = str_utf8_decode(&a);
|
||||||
|
}
|
||||||
|
while(*a && !str_utf8_isspace(codeA));
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
codeB = str_utf8_decode(&b);
|
codeB = str_utf8_decode(&b);
|
||||||
|
}
|
||||||
|
while(*b && !str_utf8_isspace(codeB));
|
||||||
|
|
||||||
diff = codeA - codeB;
|
diff = codeA - codeB;
|
||||||
|
|
||||||
if((diff < 0 && !str_utf8_is_confusable(codeA, codeB))
|
if((diff < 0 && !str_utf8_is_confusable(codeA, codeB))
|
||||||
|
|
Loading…
Reference in a new issue