mirror of
https://github.com/cc65/cc65.git
synced 2025-02-09 17:33:00 +00:00
Merge pull request #2592 from kugelfuhr/kugelfuhr/fix-2566
Fix a field alignment bug
This commit is contained in:
commit
86ed0722e4
@ -104,10 +104,16 @@ static void CopyStruct (ExprDesc* LExpr, ExprDesc* RExpr)
|
||||
|
||||
} else {
|
||||
|
||||
/* The rhs cannot happen to be loaded in the primary as it is too big */
|
||||
/* Load the address of rhs into the primary */
|
||||
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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user