Browse Source

* fixed an OP_SUB bug in tcgz80.a_op_const_reg_internal

git-svn-id: branches/z80@44977 -
nickysn 5 years ago
parent
commit
027217d1fe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/z80/cgcpu.pas

+ 1 - 1
compiler/z80/cgcpu.pas

@@ -1096,7 +1096,7 @@ unit cgcpu;
                      tmpop:=A_DEC
                      tmpop:=A_DEC
                    else if (tmpop=A_NONE) and (curvalue<>0) then
                    else if (tmpop=A_NONE) and (curvalue<>0) then
                      tmpop:=A_SUB
                      tmpop:=A_SUB
-                   else if tmpop=A_ADD then
+                   else if tmpop=A_SUB then
                      tmpop:=A_SBC;
                      tmpop:=A_SBC;
                    case tmpop of
                    case tmpop of
                      A_NONE:
                      A_NONE: