diff options
-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 (); |