Skip to content

Commit

Permalink
exclude the case of fixed array initialization values
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Oct 3, 2024
1 parent 848563e commit f6bba9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/gen/c/struct.v
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ fn (mut g Gen) zero_struct_field(field ast.StructField) bool {
g.expr_with_tmp_var(field.default_expr, field.default_expr_typ, field.typ,
tmp_var)
return true
} else if final_sym.info is ast.ArrayFixed {
} else if final_sym.info is ast.ArrayFixed && field.default_expr !is ast.ArrayInit {
tmp_var := g.new_tmp_var()
s := g.go_before_last_stmt()
g.empty_line = true
Expand Down

0 comments on commit f6bba9e

Please sign in to comment.