diff options
author | Nick Clifton <nickc@redhat.com> | 2015-04-24 15:31:36 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-04-24 15:31:36 +0100 |
commit | 63c72d1ae497cdf43db5347464a97164e720b83f (patch) | |
tree | 366f9bcb0cb5d905d5e3fb0332901dda751aefc7 /sim | |
parent | b1fa9dd630eeb0a8282207cbbe399a25b2491412 (diff) | |
download | binutils-63c72d1ae497cdf43db5347464a97164e720b83f.zip binutils-63c72d1ae497cdf43db5347464a97164e720b83f.tar.gz binutils-63c72d1ae497cdf43db5347464a97164e720b83f.tar.bz2 |
Fix typo in check for valid register number in RX sim.
PR sim/18273
* reg.c (put_reg): Fix check for valid register number.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/rx/ChangeLog | 5 | ||||
-rw-r--r-- | sim/rx/reg.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 45e67c3..bcb9761 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,8 @@ +2015-04-24 Nick Clifton <nickc@redhat.com> + + PR sim/18273 + * reg.c (put_reg): Fix check for valid register number. + 2015-04-13 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/rx/reg.c b/sim/rx/reg.c index 0fbd4c3..6effe4b 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 (); |