From: cuz Date: Sat, 27 Jul 2002 09:55:48 +0000 (+0000) Subject: Fixed a bug X-Git-Tag: V2.12.0~2252 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=195feebc00e12ac816eb54d4724fd523d6bf7832;p=cc65 Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@1375 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 716d49bba..cca466465 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -1574,7 +1574,7 @@ void g_addeqstatic (unsigned flags, unsigned long label, long offs, if (val < 0x100) { AddCodeLine ("ldy #<(%s)", lbuf); AddCodeLine ("sty ptr1"); - AddCodeLine ("ldy #>(%s+1)", lbuf); + AddCodeLine ("ldy #>(%s)", lbuf); if (val == 1) { AddCodeLine ("jsr laddeq1"); } else { @@ -1589,7 +1589,7 @@ void g_addeqstatic (unsigned flags, unsigned long label, long offs, } else { AddCodeLine ("ldy #<(%s)", lbuf); AddCodeLine ("sty ptr1"); - AddCodeLine ("ldy #>(%s+1)", lbuf); + AddCodeLine ("ldy #>(%s)", lbuf); AddCodeLine ("jsr laddeq"); } break; @@ -1809,7 +1809,7 @@ void g_subeqstatic (unsigned flags, unsigned long label, long offs, if (val < 0x100) { AddCodeLine ("ldy #<(%s)", lbuf); AddCodeLine ("sty ptr1"); - AddCodeLine ("ldy #>(%s+1)", lbuf); + AddCodeLine ("ldy #>(%s)", lbuf); AddCodeLine ("lda #$%02X", (unsigned char)val); AddCodeLine ("jsr lsubeqa"); } else { @@ -1820,7 +1820,7 @@ void g_subeqstatic (unsigned flags, unsigned long label, long offs, } else { AddCodeLine ("ldy #<(%s)", lbuf); AddCodeLine ("sty ptr1"); - AddCodeLine ("ldy #>(%s+1)", lbuf); + AddCodeLine ("ldy #>(%s)", lbuf); AddCodeLine ("jsr lsubeq"); } break;