openpic: fix segfault on -M mac99 savevm
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 9 Feb 2015 22:40:49 +0000 (22:40 +0000)
committerAlexander Graf <agraf@suse.de>
Mon, 9 Mar 2015 14:00:06 +0000 (15:00 +0100)
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

index 305377d899298acb99b95417f3036c63d45d5a17..e76d7d1db7cfdcc2a7c8f00644372b83022c503d 100644 (file)
@@ -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);
     }