From: Nick Clifton Date: Fri, 24 Apr 2015 14:31:36 +0000 (+0100) Subject: Fix typo in check for valid register number in RX sim. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63c72d1ae497cdf43db5347464a97164e720b83f;p=binutils-gdb.git Fix typo in check for valid register number in RX sim. PR sim/18273 * reg.c (put_reg): Fix check for valid register number. --- 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 ();