summaryrefslogtreecommitdiff
path: root/6/simp.c
diff options
context:
space:
mode:
authorandrewc <andrew_chambers@trimble.com>2016-01-12 14:26:06 +1300
committerandrewc <andrew_chambers@trimble.com>2016-01-12 14:26:52 +1300
commit3fe8f058c4ae3f84ef931b61ff667ef93dc741ab (patch)
treeba156baa0828e9b268840b950908b40b37c77d57 /6/simp.c
parent4c1c6f77962993b62a082bfd2d91bde671cdc329 (diff)
downloadmc-3fe8f058c4ae3f84ef931b61ff667ef93dc741ab.tar.gz
Fix #36 - Emit Oret arg when return type is void
Diffstat (limited to '6/simp.c')
-rw-r--r--6/simp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/6/simp.c b/6/simp.c
index d3505b9..1b21ed7 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -1638,9 +1638,10 @@ static Node *rval(Simp *s, Node *n, Node *dst)
append(s, v);
} else if (n->expr.nargs && n->expr.args[0]) {
t = s->ret;
+ u = rval(s, args[0], NULL);
/* void calls return nothing */
if (t) {
- t = set(t, rval(s, args[0], NULL));
+ t = set(t, u);
append(s, t);
}
}