cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
PATCH 1/1 cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
The switch from pointers to addresses (commit026aeffcb4752054830ba203020ed6eb05bcaba8 andffaf857778286ca54e3804432a2369a279e73aa7) added
a off-by-one bug to 16bit backward blits. Fix.
Reported-by 李强 <[email protected]>
Signed-off-by Gerd Hoffmann <[email protected]>
--- hw/display/cirrus_vga_rop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/display/cirrus_vga_rop.h +1 -1
@@ -219,7 +219,7 @@ glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_16)(CirrusVGAState *s, srcpitch += bltwidth;for (y =0 ; y < bltheight; y++) {for (x =0 ; x < bltwidth; x+=2 ) { -ROP_OP_TR_16 (s, dstaddr,cirrus_src16 (s, srcaddr), transp); +ROP_OP_TR_16 (s, dstaddr -1 ,cirrus_src16 (s, srcaddr -1 ), transp); dstaddr -=2 ; srcaddr -=2 ; }
Signature · 1 line
1.8.3.1
Quoted 12 lines
-----Original Message-----
From: Qemu-devel [mailto:[email protected]] On Behalf Of Gerd Hoffmann
Sent: Friday, March 17, 2017 3:22 PM
To: [email protected]
Cc: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH] cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
Quoted 7 lines
The switch from pointers to addresses (commit
026aeffcb4752054830ba203020ed6eb05bcaba8andffaf857778286ca54e3804432a2369a279e73aa7) added a off-by-one bug to 16bit backward blits. Fix.Reported-by 李强 <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>
Reviewed-by Li Qiang <[email protected]>
Quoted 22 lines
--- hw/display/cirrus_vga_rop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/display/cirrus_vga_rop.h index renamed from hw/display/cirrus_vga_rop.h +0
-0c61a677..0841b9e 100644
hw/display/cirrus_vga_rop.h +2
-2@@ -219,7 +219,7 @@ glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_16)(CirrusVGAState *s, srcpitch += bltwidth;for (y =0 ; y < bltheight; y++) {for (x =0 ; x < bltwidth; x+=2 ) { -ROP_OP_TR_16 (s, dstaddr,cirrus_src16 (s, srcaddr), transp); +ROP_OP_TR_16 (s, dstaddr -1 ,cirrus_src16 (s, srcaddr -1 ), + transp); dstaddr -=2 ; srcaddr -=2 ; } --1.8.3.1