diff --git a/vlib/v/gen/c/auto_eq_methods.v b/vlib/v/gen/c/auto_eq_methods.v index 330fbb3b98bc78..c6f905e9d32bf5 100644 --- a/vlib/v/gen/c/auto_eq_methods.v +++ b/vlib/v/gen/c/auto_eq_methods.v @@ -438,7 +438,7 @@ fn (mut g Gen) gen_fixed_array_equality_fn(left_type ast.Type) string { mut fn_builder := strings.new_builder(512) fn_builder.writeln('inline bool ${ptr_styp}_arr_eq(${arg_styp} a, ${arg_styp} b) {') if left_typ.sym.is_primitive_fixed_array() { - fn_builder.writeln('\tif (!memcmp(${left}, ${right}, sizeof(${arg_styp}))) {') + fn_builder.writeln('\tif (!memcmp(&a, &b, sizeof(${arg_styp}))) {') fn_builder.writeln('\t\treturn true;') fn_builder.writeln('\t}') }