diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/acl.c | 4 | ||||
-rw-r--r-- | src/src/expand.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/src/acl.c b/src/src/acl.c index fd958aa39..4fda03b77 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -3103,7 +3103,9 @@ for (; cb != NULL; cb = cb->next) /* The true/false parsing here should be kept in sync with that used in expand.c when dealing with ECOND_BOOL so that we don't have too many different definitions of what can be a boolean. */ - if (Ustrspn(arg, "0123456789") == Ustrlen(arg)) /* Digits, or empty */ + if (*arg == '-' + ? Ustrspn(arg+1, "0123456789") == Ustrlen(arg+1) /* Negative number */ + : Ustrspn(arg, "0123456789") == Ustrlen(arg)) /* Digits, or empty */ rc = (Uatoi(arg) == 0)? FAIL : OK; else rc = (strcmpic(arg, US"no") == 0 || diff --git a/src/src/expand.c b/src/src/expand.c index bd097db43..64a3a86e6 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -2849,7 +2849,9 @@ switch(cond_type) be no maintenance burden from replicating it. */ if (len == 0) boolvalue = FALSE; - else if (Ustrspn(t, "0123456789") == len) + else if (*t == '-' + ? Ustrspn(t+1, "0123456789") == len-1 + : Ustrspn(t, "0123456789") == len) { boolvalue = (Uatoi(t) == 0) ? FALSE : TRUE; /* expand_check_condition only does a literal string "0" check */ |