Assignment to structure member incorrect
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 28 Oct 2001 19:17:27 +0000 (19:17 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 28 Oct 2001 19:17:27 +0000 (19:17 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1459 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCicode.c

index 8506e9b6540c6f0d6a534d8ef21a5b26dd360524..fc950632316409ac51307900989e6cdaff7aa0fd 100644 (file)
@@ -2620,7 +2620,7 @@ geniCodeAssign (operand * left, operand * right, int nosupdate)
 
   /* first check the type for pointer assignement */
   if (left->isaddr && IS_PTR (ltype) && IS_ITEMP (left) &&
-      compareType (ltype, rtype) < 0)
+      compareType (ltype, rtype) <= 0)
     {
       if (compareType (ltype->next, rtype) < 0)
        right = geniCodeCast (ltype->next, right, TRUE);