From dec65176f03f77592018f0ddb44411c0a5ddf0a7 Mon Sep 17 00:00:00 2001 From: Colin Leroy-Mira Date: Mon, 15 Jan 2024 21:51:17 +0100 Subject: [PATCH] Fix #2357 - Copy est.size and flags of op when moving it --- src/cc65/coptlong.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cc65/coptlong.c b/src/cc65/coptlong.c index 29cf4d353..7e30ef42e 100644 --- a/src/cc65/coptlong.c +++ b/src/cc65/coptlong.c @@ -120,9 +120,13 @@ unsigned OptLongAssign (CodeSeg* S) !CS_RangeHasLabel(S, I, 12)) { L[1]->AM = L[11]->AM; + L[1]->Size = L[11]->Size; + L[1]->Flags = L[11]->Flags; CE_SetArg(L[1], L[11]->Arg); L[3]->AM = L[9]->AM; + L[3]->Size = L[9]->Size; + L[3]->Flags = L[9]->Flags; CE_SetArg(L[3], L[9]->Arg); CS_DelEntries (S, I+8, 4); @@ -211,9 +215,13 @@ unsigned OptLongCopy (CodeSeg* S) !CS_RangeHasLabel(S, I, 12)) { L[1]->AM = L[11]->AM; + L[1]->Size = L[11]->Size; + L[1]->Flags = L[11]->Flags; CE_SetArg(L[1], L[11]->Arg); L[3]->AM = L[9]->AM; + L[3]->Size = L[9]->Size; + L[3]->Flags = L[9]->Flags; CE_SetArg(L[3], L[9]->Arg); CS_DelEntries (S, I+8, 4);