mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
is_numeric() returns now FALSE if it was given empty string.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@514 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
1a816b15f5
commit
1a655f3575
@ -421,6 +421,9 @@ int is_numeric(const char *str, char end_char)
|
||||
{
|
||||
g_return_val_if_fail(str != NULL, FALSE);
|
||||
|
||||
if (*str == '\0' || *str == end_char)
|
||||
return FALSE;
|
||||
|
||||
while (*str != '\0' && *str != end_char) {
|
||||
if (!isdigit(*str)) return FALSE;
|
||||
str++;
|
||||
|
Loading…
Reference in New Issue
Block a user