aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/cgen.c')
-rw-r--r--bootstrap/cgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bootstrap/cgen.c b/bootstrap/cgen.c
index 9e13e12..8685ffe 100644
--- a/bootstrap/cgen.c
+++ b/bootstrap/cgen.c
@@ -232,7 +232,7 @@ genexpr(struct expr *ex) {
pri("((%t)%n)", ty, ex);
break;
case Eget:
- pri("%e.%s", ex->get.lhs, ex->get.fld);
+ pri("%e%s%s", ex->get.lhs, ex->get.lhs->ty->t == TYptr ? "->" : ".", ex->get.fld);
break;
}
}