[PATCH 1/3] filter: report values for out-of-range pair components
Pair components are range-checked at runtime when constructed from expressions. Include both evaluated values in the error so operators can identify the input that failed without reproducing the route. --- filter/f-inst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/filter/f-inst.c b/filter/f-inst.c index 967887f6..273dc293 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -338,7 +338,8 @@ uint u1 = v1.val.i; uint u2 = v2.val.i; if ((u1 > 0xFFFF) || (u2 > 0xFFFF)) - runtime( "Can't operate with value out of bounds in pair constructor" ); + runtime("Pair component out of range 0..65535 (got %u, %u)", + u1, u2); RESULT(T_PAIR, i, (u1 << 16) | u2); } base-commit: 06ca9bf5c588df6c0587eb64bd375eb0ade526ab -- 2.47.3
participants (1)
-
Alice39s