diff options
-rw-r--r-- | src/core/misc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/misc.c b/src/core/misc.c index ed88be1c..b1e2521a 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -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++; |