shithub: mc

Download patch

ref: ae702f148386526a4043f675917ba4c2b3ac41b2
parent: 9f4f21259fad5de760c41507d362b8a0959148c9
author: Ori Bernstein <[email protected]>
date: Sun Nov 30 13:27:06 EST 2014

The lhs of += should be an lval.

--- a/6/simp.c
+++ b/6/simp.c
@@ -1327,7 +1327,7 @@
         case Oaddeq: case Osubeq: case Omuleq: case Odiveq: case Omodeq:
         case Oboreq: case Obandeq: case Obxoreq: case Obsleq: case Obsreq:
             assert(fusedmap[exprop(n)] != Obad);
-            u = rval(s, args[0], NULL);
+            u = lval(s, args[0]);
             v = rval(s, args[1], NULL);
             v = mkexpr(n->loc, fusedmap[exprop(n)], u, v, NULL);
             v->expr.type = u->expr.type;