mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -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);
|
g_return_val_if_fail(str != NULL, FALSE);
|
||||||
|
|
||||||
|
if (*str == '\0' || *str == end_char)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
while (*str != '\0' && *str != end_char) {
|
while (*str != '\0' && *str != end_char) {
|
||||||
if (!isdigit(*str)) return FALSE;
|
if (!isdigit(*str)) return FALSE;
|
||||||
str++;
|
str++;
|
||||||
|
Loading…
Reference in New Issue
Block a user