1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

spell: fix comparison of URL prefix with UTF-8 chars (issue #1739)

There is no problem in practice because the possible URL prefixes are hardcoded
in the spell plugin and don't contain any UTF-8 char on more than one byte.
This commit is contained in:
Sébastien Helleu
2022-01-15 09:59:34 +01:00
parent 50167ca96f
commit e6f65122a9
+3 -1
View File
@@ -379,8 +379,10 @@ spell_string_is_url (const char *word)
for (i = 0; spell_url_prefix[i]; i++)
{
if (weechat_strncasecmp (word, spell_url_prefix[i],
strlen (spell_url_prefix[i])) == 0)
weechat_utf8_strlen (spell_url_prefix[i])) == 0)
{
return 1;
}
}
/* word is not an URL */