mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Hopefully fix string fuzzying for unicode
This commit is contained in:
parent
76e4ca1bf6
commit
6d68e22cd1
|
@ -2188,7 +2188,7 @@ const char *str_utf8_skip_whitespaces(const char *str)
|
|||
return str;
|
||||
}
|
||||
|
||||
static int str_utf8_isstart(char c)
|
||||
int str_utf8_isstart(char c)
|
||||
{
|
||||
if((c&0xC0) == 0x80) /* 10xxxxxx */
|
||||
return 0;
|
||||
|
|
|
@ -1245,6 +1245,8 @@ int str_utf8_comp_names(const char *a, const char *b);
|
|||
|
||||
int str_utf8_isspace(int code);
|
||||
|
||||
int str_utf8_isstart(char c);
|
||||
|
||||
const char *str_utf8_skip_whitespaces(const char *str);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1195,7 +1195,7 @@ void CSqlScore::FuzzyString(char *pString)
|
|||
break;
|
||||
|
||||
newString[pos++] = pString[i];
|
||||
if (pString[i] != '\\')
|
||||
if (pString[i] != '\\' && str_utf8_isstart(pString[i]))
|
||||
newString[pos++] = '%';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue