summaryrefslogtreecommitdiff
path: root/cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgen.c')
-rw-r--r--cgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgen.c b/cgen.c
index 2131abd..384cb0b 100644
--- a/cgen.c
+++ b/cgen.c
@@ -1702,7 +1702,7 @@ static bool cgen_val_ptr(CGenerator *g, void *v, Type *t, Location where) {
arr_foreach(t->struc->fields, Field, f) {
if (f != t->struc->fields)
cgen_write(g, ", ");
- cgen_val_ptr(g, (char *)v + f->offset, f->type, where);
+ cgen_val_ptr(g, (char *)v + f->offset, &f->type, where);
}
cgen_write(g, "}");
break;