aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/common/sim-core.c')
-rw-r--r--sim/common/sim-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c
index 9c49fed..079c964 100644
--- a/sim/common/sim-core.c
+++ b/sim/common/sim-core.c
@@ -660,7 +660,7 @@ sim_core_xor_read_buffer (SIM_DESC sd,
else
/* only break up transfers when xor-endian is both selected and enabled */
{
- unsigned_1 x[WITH_XOR_ENDIAN];
+ unsigned_1 x[WITH_XOR_ENDIAN + 1]; /* +1 to avoid zero-sized array */
unsigned nr_transfered = 0;
address_word start = addr;
unsigned nr_this_transfer = (WITH_XOR_ENDIAN - (addr & ~(WITH_XOR_ENDIAN - 1)));