* src/z80/gen.c (gencjneshort): Fixed
[fw/sdcc] / src / z80 / gen.c
index 642b3a3a0529fdf084d85b42b5e3904b12d50d04..6bffec3cca9439c1da0ba5f1bc9f4dd5b056551b 100644 (file)
 enum 
 {
   /* Set to enable debugging trace statements in the output assembly code. */
-  DISABLE_DEBUG = 0,
+  DISABLE_DEBUG = 0
 };
 
 static char *_z80_return[] =
@@ -3733,11 +3733,9 @@ gencjneshort (operand * left, operand * right, symbol * lbl)
          emit2 ("ld a,%s", aopGet (AOP (left), offset, FALSE));
          if (size > 1)
            {
-             size--;
-             offset++;
-             while (size--)
+             while (--size)
                {
-                 emit2 ("or a,%s", aopGet (AOP (left), offset, FALSE));
+                 emit2 ("or a,%s", aopGet (AOP (left), ++offset, FALSE));
                }
            }
          else