Skip to contentSkip to conversation

memory: Fix copy&paste mistake in memory_region_iorange_write

PATCH New Jan Kiszka 1 participant 1 message Aug 26, 2012

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 memory: Fix copy&paste mistake in memory_region_iorange_write

From: Jan Kiszka <[email protected]>

The last argument of find_portio is "write", so this must be true here.

---

We were likely lucky so far and didn't hit this - it would have caused an assertion. However, there are also rarely used devices...

 memory.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
memory.c +1 -1
index 643871b..d528d1f 100644
@@ -426,7 +426,7 @@ static void memory_region_iorange_write(IORange *iorange,
         if (mrp) {
             mrp->write(mr->opaque, offset, data);
         } else if (width == 2) {
-            mrp = find_portio(mr, offset - mrio->offset, 1, false);
+            mrp = find_portio(mr, offset - mrio->offset, 1, true);
             assert(mrp);
             mrp->write(mr->opaque, offset, data & 0xff);
             mrp->write(mr->opaque, offset + 1, data >> 8);
Signature · 1 line
1.7.3.4