diff options
Diffstat (limited to 'hw/cirrus_vga_rop.h')
-rw-r--r-- | hw/cirrus_vga_rop.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/cirrus_vga_rop.h b/hw/cirrus_vga_rop.h index 3d6a1fef1f..0079d12701 100644 --- a/hw/cirrus_vga_rop.h +++ b/hw/cirrus_vga_rop.h @@ -31,6 +31,12 @@ glue(cirrus_bitblt_rop_fwd_, ROP_NAME)(CirrusVGAState *s, int x,y; dstpitch -= bltwidth; srcpitch -= bltwidth; + + if (dstpitch < 0 || srcpitch < 0) { + /* is 0 valid? srcpitch == 0 could be useful */ + return; + } + for (y = 0; y < bltheight; y++) { for (x = 0; x < bltwidth; x++) { ROP_OP(*dst, *src); |