1
0
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:
Timo Sirainen 2000-07-23 11:54:54 +00:00 committed by cras
parent 1a816b15f5
commit 1a655f3575

View File

@ -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++;