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

irc: return 0 in function irc_protocol_is_numeric_command if the command is NULL or empty

This commit is contained in:
Sébastien Helleu
2020-03-10 19:15:59 +01:00
parent 8a5046f0a1
commit 2fe27584ff
+4
View File
@@ -69,12 +69,16 @@
int
irc_protocol_is_numeric_command (const char *str)
{
if (!str || !str[0])
return 0;
while (str && str[0])
{
if (!isdigit ((unsigned char)str[0]))
return 0;
str++;
}
return 1;
}