Commit ee1263f7d43bd29b15fc72c4d9520a824e8004df

Anthony Green 2021-07-29T17:46:17

Fix 'type'-o

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/src/moxie/ffi.c b/src/moxie/ffi.c
index 696581a..1a65660 100644
--- a/src/moxie/ffi.c
+++ b/src/moxie/ffi.c
@@ -212,10 +212,10 @@ void ffi_closure_eabi (unsigned arg1, unsigned arg2, unsigned arg3,
 	  break;
 	case FFI_TYPE_STRUCT:
           {
-            if (arg_types[i]->type->size > 4)
+            if (arg_types[i]->size > 4)
               {
-                void *copy = alloca(arg_types[i]->type->size);
-                memcpy(copy, *(void**)ptr, arg_types[i]->type->size);
+                void *copy = alloca(arg_types[i]->size);
+                memcpy(copy, *(void**)ptr, arg_types[i]->size);
                 avalue[i] = copy;
               }
             else