From 62451557f98f17a237a4d0c23d8f017ef0c14789 Mon Sep 17 00:00:00 2001 From: Alex Volkov Date: Wed, 25 Mar 2026 19:00:57 -0400 Subject: [PATCH] Revert the fix for #2461 in search of a more general solution --- src/cc65/codeoptutil.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cc65/codeoptutil.c b/src/cc65/codeoptutil.c index b098845b4..9c9699a6a 100644 --- a/src/cc65/codeoptutil.c +++ b/src/cc65/codeoptutil.c @@ -1197,10 +1197,8 @@ void AddOpHigh (StackOpData* D, opc_t OPC, LoadInfo* LI, int KeepResult) InsertEntry (D, X, D->IP++); } - /* If this is the right hand side, we can remove the load. */ - if (LI == &D->Rhs) { - LI->X.Flags |= LI_REMOVE; - } + /* In both cases, we can remove the load */ + LI->X.Flags |= LI_REMOVE; } else {