Skip to content

Commit

Permalink
add one more assert for tmpl_require_enum_prefix
Browse files Browse the repository at this point in the history
all YES to '&' should have been changed to AUTO by the tmpl
tokenizer
  • Loading branch information
alandekok committed Jan 23, 2025
1 parent 751d7de commit 4f41886
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/unlang/xlat_tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,8 @@ ssize_t xlat_print_node(fr_sbuff_t *out, xlat_exp_head_t const *head, xlat_exp_t
* Parsing %{User-Name} gets printed as %{User-Name}
*/
if (node->vpt->rules.attr.prefix == TMPL_ATTR_REF_PREFIX_YES) {
fr_assert(!tmpl_require_enum_prefix);

if (node->vpt->name[0] != '&') FR_SBUFF_IN_CHAR_RETURN(out, '&');
FR_SBUFF_IN_STRCPY_RETURN(out, node->fmt);
goto done;
Expand Down

0 comments on commit 4f41886

Please sign in to comment.