Commit 4f7329cd93a15486679ae34af61f8143eacc3e79

Thomas de Grivel 2024-03-17T21:49:33

fix cfn_apply

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/libc3/cfn.c b/libc3/cfn.c
index 4def1d9..3b75c88 100644
--- a/libc3/cfn.c
+++ b/libc3/cfn.c
@@ -51,13 +51,14 @@ s_tag * cfn_apply (s_cfn *cfn, s_list *args, s_tag *dest)
   cfn_tag_init(&tmp, cfn->result_type);
   if (cfn->cif.rtype == &ffi_type_pointer) {
     /* make result point to result_pointer */
-    if (! tag_to_ffi_pointer(&tmp, cfn->result_type, (void **) &result_pointer))
+    if (! tag_to_ffi_pointer(&tmp, cfn->result_type,
+                             (void **) &result_pointer))
       return NULL;
     result = &result_pointer;
   }
   else {
     /* make result point to tmp value */
-    if (! tag_to_ffi_pointer(&tmp, cfn->result_type, result))
+    if (! tag_to_ffi_pointer(&tmp, cfn->result_type, &result))
       return NULL;
   }
   if (cfn->arity) {