From 2fdc4341b4a58beb120ffb9dd1454a627614faaa Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Mon, 9 Nov 2026 20:52:28 +0000 Subject: [PATCH] amd64: Fix incorrect store width for structure array elements --- amd64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/amd64.c b/amd64.c index d2c4845..a9f77b3 100644 --- a/amd64.c +++ b/amd64.c @@ -17357,6 +17357,7 @@ static int emit_parse_postfix_copy_source_address_now (const char *reg, struct l if (tok.kind == TOK_LBRACK) { int elem_size = last_elem_size; + int member_seen = postfix_member_seen; if (!have_address) { @@ -17419,9 +17420,10 @@ static int emit_parse_postfix_copy_source_address_now (const char *reg, struct l * storage size as the scalar load width (e.g. UINT8 Length[2] * becomes a 16-bit load for Length[i]). */ - if (postfix_member_seen) { + if (member_seen) { postfix_member_size = index_step_size (elem_size); + postfix_member_seen = 1; if (postfix_member_pointer_depth > 0) { postfix_member_pointer_depth--; -- 2.34.1