[PULL,26/38] openpic: fix segfault on -M mac99 savevm
diff mbox

Message ID 1425804297-53727-27-git-send-email-agraf@suse.de
State New
Headers show

Commit Message

Alexander Graf March 8, 2015, 8:44 a.m. UTC
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

A simple copy/paste error causes savevm on -M mac99 to segfault.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/intc/openpic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox

diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index 305377d..e76d7d1 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -1335,7 +1335,7 @@  static void openpic_save(QEMUFile* f, void *opaque)
     for (i = 0; i < opp->max_irq; i++) {
         qemu_put_be32s(f, &opp->src[i].ivpr);
         qemu_put_be32s(f, &opp->src[i].idr);
-        qemu_get_be32s(f, &opp->src[i].destmask);
+        qemu_put_be32s(f, &opp->src[i].destmask);
         qemu_put_sbe32s(f, &opp->src[i].last_cpu);
         qemu_put_sbe32s(f, &opp->src[i].pending);
     }