From 37cd90bec163f28065e76ba7670c61963988fe2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Sat, 25 Dec 2021 19:00:26 +0100 Subject: [PATCH] ppu_blit: change type to Uint16 --- src/devices/ppu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/ppu.c b/src/devices/ppu.c index f275faf..603ca47 100644 --- a/src/devices/ppu.c +++ b/src/devices/ppu.c @@ -105,7 +105,7 @@ ppu_blit(Ppu *p, Layer *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, U { int v, h, opaque = blending[4][color]; for(v = 0; v < 8; ++v) { - int c = sprite[v] | (twobpp ? sprite[v + 8] : 0) << 8; + Uint16 c = sprite[v] | (twobpp ? sprite[v + 8] : 0) << 8; for(h = 7; h >= 0; --h, c >>= 1) { Uint8 ch = (c & 1) | ((c >> 7) & 2); if(opaque || ch)