Commit f4aefa88f6052ea22bf841e98040e0646703563e

Thomas de Grivel 2024-07-03T19:59:08

fix data_compare for structs

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libc3/data.c b/libc3/data.c
index 358588a..2780070 100644
--- a/libc3/data.c
+++ b/libc3/data.c
@@ -397,7 +397,7 @@ bool data_compare (const s_sym *type, const void *a, const void *b)
     sa.type = st;
     sa.data = (void *) a;
     sb.type = st;
-    sb.data = (void *) a;
+    sb.data = (void *) b;
     return compare_struct(&sa, &sb);
   }
   err_write_1("data_compare: unknown type: ");