Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 15, 2024
1 parent e77c6fe commit b92553c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/gen/c/auto_eq_methods.v
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
}
Expand Down

0 comments on commit b92553c

Please sign in to comment.