From: Alan T. DeKok Date: Thu, 28 Sep 2023 12:33:04 +0000 (-0400) Subject: don't smash operator before printing it in error message X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca0ffc84600bfb5838fcc186ddd0935469fcf69c;p=thirdparty%2Ffreeradius-server.git don't smash operator before printing it in error message --- diff --git a/src/lib/util/calc.c b/src/lib/util/calc.c index fbe782352ee..d1ba7c8ba86 100644 --- a/src/lib/util/calc.c +++ b/src/lib/util/calc.c @@ -2138,10 +2138,10 @@ int fr_value_calc_assignment_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_token_t return fr_value_box_cast(ctx, dst, dst->type, dst->enumv, src); /* cast, as the RHS might not (yet) be the same! */ } - op = assignment2op[op]; - if (op == T_INVALID) { + if (assignment2op[op] == T_INVALID) { return handle_result(dst->type, op, ERR_INVALID); } + op = assignment2op[op]; /* * Just call the binary op function. It already ensures that (a) the inputs are "const", and (b)