* src/SDCCicode.c (geniCodeAssign): return (itemp) right instead of left
[fw/sdcc] / src / SDCCicode.c
index dc027f75074a1b92845fe2041789df7f2778e909..1a165bbe86a23d37295906335dc6761635ba28a1 100644 (file)
@@ -3238,7 +3238,9 @@ geniCodeAssign (operand * left, operand * right, int nosupdate, int strictLval)
     ic->supportRtn = 1;
 
   ic->nosupdate = nosupdate;
-  return left;
+  /* left could be a pointer assignment,
+     return the properly casted right instead */
+  return right;
 }
 
 /*-----------------------------------------------------------------*/