diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-04-13 04:01:19 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-04-13 13:43:58 +0200 |
commit | 7a6e16040d65227557f1f2224b5904a7373da86e (patch) | |
tree | e727e7c7cdf8f0008a3611ea1b6dd66f2a5ce9fd /src/evaluate.c | |
parent | 3da9643fb9ff9a2e8386abe142138256d1e2c4d2 (diff) |
evaluate: allow for zero length ranges
Allow for ranges such as, eg. 30-30.
This is required by the new intervals.c code, which normalize constant,
prefix set elements to all ranges.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index 7f748c49..eb147585 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -1029,7 +1029,7 @@ static int expr_evaluate_range(struct eval_ctx *ctx, struct expr **expr) left = range->left; right = range->right; - if (mpz_cmp(left->value, right->value) >= 0) + if (mpz_cmp(left->value, right->value) > 0) return expr_error(ctx->msgs, range, "Range has zero or negative size"); datatype_set(range, left->dtype); |