diff options
| author | 2022-08-05 19:56:09 +0200 | |
|---|---|---|
| committer | 2022-08-05 19:56:09 +0200 | |
| commit | a2e4d0a565a8e756f36177003a51e224aca238b9 (patch) | |
| tree | 368f027a7e08cd7750f0b61f2e6277f70983fd37 /bootstrap/cgen.c | |
| parent | c2a13e05596c724fbdbc3e8ff1266c099b675e56 (diff) | |
. operator on pointers
Diffstat (limited to 'bootstrap/cgen.c')
| -rw-r--r-- | bootstrap/cgen.c | 2 |
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; } } |