aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-10-15 21:53:42 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-10-15 21:53:42 +0200
commit5eec897b4d962e643e26574d1bffc22ffcaddac6 (patch)
treeb8b358dc6faa801c8cb0e4cb4473bffa6783996e
parenta3265629451475df75a3cd1fbe1805bbb71b2365 (diff)
set_eval_int() now allows negative integers.
-rw-r--r--set.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/set.c b/set.c
index 6a45fd14..d172a79f 100644
--- a/set.c
+++ b/set.c
@@ -174,6 +174,10 @@ char *set_eval_int( set_t *set, char *value )
{
char *s;
+ /* Allow a minus at the first position. */
+ if( *s == '-' )
+ s ++;
+
for( s = value; *s; s ++ )
if( !isdigit( *s ) )
return NULL;