From 5b11eb4bb95a9982f33f2c580318202afc0b0882 Mon Sep 17 00:00:00 2001 From: acqn Date: Tue, 31 Dec 2019 15:55:51 +0800 Subject: [PATCH] Corrected check in OptTransfers2 for register usage. Fixed Issue 992. --- src/cc65/coptind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc65/coptind.c b/src/cc65/coptind.c index f2ece2cee..e35aa5bee 100644 --- a/src/cc65/coptind.c +++ b/src/cc65/coptind.c @@ -1471,7 +1471,7 @@ unsigned OptTransfers2 (CodeSeg* S) (N = CS_GetNextEntry (S, I)) != 0 && !CE_HasLabel (N) && (N->Info & OF_XFR) != 0 && - GetRegInfo (S, I+2, E->Chg) != E->Chg) { + (GetRegInfo (S, I+2, E->Chg) & E->Chg) == 0) { CodeEntry* X = 0;