mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 22:25:28 +00:00
More explicit solution. The first one was a bit hackish.
This commit is contained in:
@@ -105,9 +105,15 @@ static void CopyStruct (ExprDesc* LExpr, ExprDesc* RExpr)
|
||||
} else {
|
||||
|
||||
/* Load the address of rhs into the primary */
|
||||
ED_AddrExpr (RExpr);
|
||||
if (!ED_IsLocExpr (RExpr)) {
|
||||
ED_AddrExpr (RExpr);
|
||||
LoadExpr (CF_NONE, RExpr);
|
||||
} else if (RExpr->IVal != 0) {
|
||||
/* We have an expression in the primary plus a constant
|
||||
** offset. Adjust the value in the primary accordingly.
|
||||
*/
|
||||
g_inc (CF_PTR | CF_CONST, RExpr->IVal);
|
||||
RExpr->IVal = 0;
|
||||
}
|
||||
|
||||
/* Push the address of the rhs as the source of memcpy */
|
||||
|
Reference in New Issue
Block a user