Fix compiler segmentation fault when field names start with '.'

This commit is contained in:
Mike
2026-07-01 21:55:11 -03:00
parent 882736d330
commit 7ccbd3d4ec

View File

@@ -10226,7 +10226,7 @@ gb_internal void check_compound_literal_field_values(CheckerContext *c, Slice<As
Ast *ident = fv->field;
if (ident->kind == Ast_ImplicitSelectorExpr) {
gbString expr_str = expr_to_string(ident);
error(ident, "Field names do not start with a '.', remove the '.' in %.*s", expr_str, LIT(assignment_str));
error(ident, "Field names do not start with a '.', remove the '.' from '%s' in %.*s", expr_str, LIT(assignment_str));
gb_string_free(expr_str);
ident = ident->ImplicitSelectorExpr.selector;