aboutsummaryrefslogtreecommitdiff
path: root/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/expr.c b/expr.c
index 97b2fd5..a68f5d8 100644
--- a/expr.c
+++ b/expr.c
@@ -165,7 +165,7 @@ mkbinaryexpr(struct location *loc, enum tokenkind op, struct expression *l, stru
break;
}
if (r->type->kind == TYPEPOINTER)
- e = l, l = r, r = e;
+ e = l, l = r, r = e, rp = lp;
if (l->type->kind != TYPEPOINTER || !(rp & PROPINT))
error(loc, "invalid operands to '+' operator");
t = l->type;