]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
minor fixes for printing
authorAlan T. DeKok <aland@freeradius.org>
Thu, 26 May 2022 14:19:47 +0000 (10:19 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 3 Jun 2022 11:15:40 +0000 (07:15 -0400)
once we've moved the arguments into our own array, we have to
print spaces ourselves.

src/lib/unlang/xlat_expr.c

index ffc1f0b2793638e55545b6e3b849cd5068dafac8..2c985cb7ddbe9bf60ef267b13b844d0ee3756912 100644 (file)
@@ -395,8 +395,9 @@ static fr_slen_t xlat_expr_print_logical(fr_sbuff_t *out, xlat_exp_t const *node
                        xlat_print(out, inst->argv[i], e_rules);
                        if (i == (inst->argc - 1)) break;
 
-                       FR_SBUFF_IN_STRCPY_RETURN(out, fr_tokens[node->call.func->token]);
                        FR_SBUFF_IN_CHAR_RETURN(out, ' ');
+                       FR_SBUFF_IN_STRCPY_RETURN(out, fr_tokens[node->call.func->token]);
+                       if ((i + 1) < inst->argc) FR_SBUFF_IN_CHAR_RETURN(out, ' ');
                }
        }