fixed bug #466029
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 29 Sep 2001 07:54:54 +0000 (07:54 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 29 Sep 2001 07:54:54 +0000 (07:54 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1319 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/z80/gen.c

index c8c6df5cf302e736d0d4445091db587bf5852b40..474d89815f8c91e93c140c0f6222f331c6c9ab06 100644 (file)
@@ -3399,7 +3399,8 @@ genCmp (operand * left, operand * right,
              else
                {
                  /* Subtract through, propagating the carry */
-                 emit2 ("%s a,%s", offset == 0 ? "sub" : "sbc", aopGet (AOP (right), offset++, FALSE));
+                 emit2 ("%s a,%s", offset == 0 ? "sub" : "sbc", aopGet (AOP (right), offset, FALSE));
+                 offset++;
                }
            }
        }