From 1cc854f04e682370974d33cc18d7ed59dcb0517d Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Oct 2020 00:32:18 +0200 Subject: [PATCH] And yet a fourth one. --- src/video/vid_tgui9440.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c index 68619f134..1c1a015d1 100644 --- a/src/video/vid_tgui9440.c +++ b/src/video/vid_tgui9440.c @@ -690,7 +690,7 @@ void tgui_hwcursor_draw(svga_t *svga, int displine) for (xx = 0; xx < svga->hwcursor.xsize; xx++) { byte = svga->hwcursor_latch.addr + (xx >> 3); - bit = (7 - xx); + bit = (7 - (xx & 7)); dat[0] = (svga->vram[byte] >> bit) & 0x01; /* AND */ dat[1] = (svga->vram[(pitch >> 1) + byte] >> bit) & 0x01; /* XOR */ val = (dat[0] << 1) | dat[1];