From: Alan T. DeKok Date: Wed, 14 May 2025 19:18:38 +0000 (-0400) Subject: correct check for tmpl_dcursor_value_box_init() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dd6a1053f0acda8fef608c8f03eba400fd09c96;p=thirdparty%2Ffreeradius-server.git correct check for tmpl_dcursor_value_box_init() -1 is "no cursor", too --- diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index 1d1f83d59db..b9861576fc3 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -534,10 +534,10 @@ check_non_leaf: * The cursor can return something, nothing (-1), or no list (-2) or no context (-3). Of * these, only the last two are actually errors. * - * "no matching pair" is a valid answer, and can be passed to the function. + * "no matching pair" returns _no_ cursor, and not an empty cursor. */ (void) tmpl_dcursor_value_box_init(&err, vb, request, vpt); - if (err < -1) return XLAT_ACTION_FAIL; + if (err < 0) return XLAT_ACTION_FAIL; } #undef ESCAPE