aboutsummaryrefslogtreecommitdiff
path: root/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/expr.c b/expr.c
index 9e92fd3..683d117 100644
--- a/expr.c
+++ b/expr.c
@@ -309,6 +309,7 @@ mkbinaryexpr(struct location *loc, enum tokenkind op, struct expression *l, stru
r = mkbinaryexpr(loc, TMUL, exprconvert(r, &typeulong), mkconstexpr(&typeulong, t->base->size));
} else if (lp & PROPINT && r->type->kind == TYPEPOINTER) {
t = r->type;
+ l = mkbinaryexpr(loc, TMUL, exprconvert(l, &typeulong), mkconstexpr(&typeulong, t->base->size));
} else {
error(loc, "invalid operands to '+' operator");
}