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}') }