Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Pena committed Dec 16, 2024
1 parent f5fd6f4 commit 4ddfb26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/gen/c/array.v
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ fn (mut g Gen) fixed_array_init(node ast.ArrayInit, array_type Type, var_name st
}
is_none := node.is_option && !node.has_init && !node.has_val

if (g.inside_struct_init && g.inside_cast && !g.inside_memset) || node.is_option {
if (g.inside_struct_init && g.inside_cast && !g.inside_memset) || (node.is_option && !is_none) {
ret_typ_str := g.styp(node.typ)
g.write('(${ret_typ_str})')
}
Expand Down

0 comments on commit 4ddfb26

Please sign in to comment.