1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 05:46:38 +02:00

core: add missing cast to unsigned char on first argument to function isdigit

This commit is contained in:
Sébastien Helleu
2020-11-19 22:20:48 +01:00
parent 214f4f66d9
commit a2266e4e3f
2 changed files with 13 additions and 8 deletions
+4 -4
View File
@@ -679,23 +679,23 @@ spell_skip_color_codes (char **string, char **result)
/* IRC color code */
weechat_string_dyn_concat (result, *string, 1);
(*string)++;
if (isdigit (*string[0]))
if (isdigit ((unsigned char)*string[0]))
{
/* foreground */
weechat_string_dyn_concat (result, *string, 1);
(*string)++;
if (isdigit (*string[0]))
if (isdigit ((unsigned char)*string[0]))
{
weechat_string_dyn_concat (result, *string, 1);
(*string)++;
}
}
if ((*string[0] == ',') && (isdigit (*string[1])))
if ((*string[0] == ',') && (isdigit ((unsigned char)*string[1])))
{
/* background */
weechat_string_dyn_concat (result, *string, 1);
(*string)++;
if (isdigit (*string[0]))
if (isdigit ((unsigned char)*string[0]))
{
weechat_string_dyn_concat (result, *string, 1);
(*string)++;