From 63c72d1ae497cdf43db5347464a97164e720b83f Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 24 Apr 2015 15:31:36 +0100 Subject: [PATCH] Fix typo in check for valid register number in RX sim. PR sim/18273 * reg.c (put_reg): Fix check for valid register number. --- sim/rx/ChangeLog | 5 +++++ sim/rx/reg.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 45e67c308e0..bcb976155e7 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,8 @@ +2015-04-24 Nick Clifton + + PR sim/18273 + * reg.c (put_reg): Fix check for valid register number. + 2015-04-13 Mike Frysinger * configure: Regenerate. diff --git a/sim/rx/reg.c b/sim/rx/reg.c index 0fbd4c38c6e..6effe4b621f 100644 --- a/sim/rx/reg.c +++ b/sim/rx/reg.c @@ -253,7 +253,7 @@ put_reg (int id, unsigned int v) } default: - if (id >= 1 || id <= 15) + if (id >= 1 && id <= 15) regs.r[id] = v; else abort (); -- 2.30.2