From 4ddfb262d57338378b9aca473778aae20b8d2f7c Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Mon, 16 Dec 2024 06:52:32 -0300 Subject: [PATCH] fix --- vlib/v/gen/c/array.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/c/array.v b/vlib/v/gen/c/array.v index ef36a043756055..f0c91673aca5e4 100644 --- a/vlib/v/gen/c/array.v +++ b/vlib/v/gen/c/array.v @@ -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})') }