]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
simplify checks
authorAlan T. DeKok <aland@freeradius.org>
Mon, 11 Jul 2022 15:29:44 +0000 (11:29 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 11 Jul 2022 15:29:44 +0000 (11:29 -0400)
src/lib/unlang/xlat_expr.c

index 9114705506eee2e9b08022ada30f3852f4fe1d43..b215009f8afcf1e97c05ecc239853072c0e054b9 100644 (file)
@@ -2154,7 +2154,7 @@ static ssize_t tokenize_field(xlat_exp_head_t *head, xlat_exp_t **out, fr_sbuff_
         *      And if there was no cast, but the input was a string,
         *      then we cast the result to a string, too.
         */
-       if (tmpl_contains_xlat(vpt) && !tmpl_is_exec(vpt) && !tmpl_contains_regex(vpt)) {
+       if (tmpl_is_xlat(vpt) || tmpl_is_xlat_unresolved(vpt)) {
                xlat_exp_head_t *xlat = tmpl_xlat(vpt);
                xlat_exp_t *cast;
                fr_type_t type;