From 31dda65afff3731d51fa249f2118e267d561dd70 Mon Sep 17 00:00:00 2001 From: Felix Lee Date: Wed, 10 Sep 1997 04:46:37 +0000 Subject: [PATCH] * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid illegal zero-sized array. * sim-core.c (sim_core_xor_read_buffer): same. --- sim/common/ChangeLog | 6 ++++++ sim/common/sim-core.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 93476e75408..8c2db641410 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,9 @@ +Tue Sep 9 21:46:46 1997 Felix Lee + + * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid + illegal zero-sized array. + * sim-core.c (sim_core_xor_read_buffer): same. + Tue Sep 9 11:20:35 1997 Doug Evans * nltvals.def: Regenerate. diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c index 9c49fed3419..079c96496a8 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))); -- 2.30.2