vga: fix region checks in wraparound case
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 30 Oct 2017 10:28:30 +0000 (11:28 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 10 Nov 2017 10:26:55 +0000 (11:26 +0100)
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: 20171030102830.4469-1-kraxel@redhat.com

hw/display/vga.c

index 1d19f6bc486609c696bc82e0a82e476089a7caa0..a64a0942da5f8b6033a545e85cb5a26d68e83cba 100644 (file)
@@ -1666,9 +1666,9 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
             /* scanline wraps from end of video memory to the start */
             assert(force_shadow);
             update = memory_region_snapshot_get_dirty(&s->vram, snap,
-                                                      page0, 0);
+                                                      page0, s->vbe_size - page0);
             update |= memory_region_snapshot_get_dirty(&s->vram, snap,
-                                                       page1, 0);
+                                                       0, page1);
         } else {
             update = memory_region_snapshot_get_dirty(&s->vram, snap,
                                                       page0, page1 - page0);