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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user