diff options
-rw-r--r-- | bin/test/test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/test/test.c b/bin/test/test.c index 832257e..bde66b9 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -529,6 +529,11 @@ get_int(v, lp) for (; *v && isspace(*v); ++v); + if(!*v) { + *lp = 0; + return; + } + if (isdigit(*v) || ((*v == '-' || *v == '+') && isdigit(*(v+1)))) { errno = 0; val = strtol(v, &ep, 10); |