irc: return 0 in function irc_protocol_is_numeric_command if the command is NULL or empty
parent
8a5046f0a1
commit
2fe27584ff
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue