From b92553cd2d8620a46ab08bb9f98f6c661d6d57bb Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 14 Dec 2024 23:49:55 -0300 Subject: [PATCH] fix --- vlib/v/gen/c/auto_eq_methods.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/c/auto_eq_methods.v b/vlib/v/gen/c/auto_eq_methods.v index 7a8f632b098987..2ec1314357c8a7 100644 --- a/vlib/v/gen/c/auto_eq_methods.v +++ b/vlib/v/gen/c/auto_eq_methods.v @@ -439,7 +439,7 @@ fn (mut g Gen) gen_fixed_array_equality_fn(left_type ast.Type) string { fn_builder.writeln('inline bool ${ptr_styp}_arr_eq(${arg_styp} a, ${arg_styp} b) {') if left_typ.sym.is_primitive_fixed_array() { suffix := if left_type.has_flag(.option) { '' } else { '[0]' } - fn_builder.writeln('\tif (!memcmp((${arg_styp}*)&a${suffix}, (${arg_styp}*)&b${suffix}, sizeof(${arg_styp}))) {') + fn_builder.writeln('\tif (!memcmp(&a${suffix}, &b${suffix}, sizeof(${arg_styp}))) {') fn_builder.writeln('\t\treturn true;') fn_builder.writeln('\t}') }