From ca5675419efd9d8ee98d54c0e211e5cde64eeea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Tue, 2 Nov 2021 18:15:11 +0100 Subject: [PATCH] ppu_write: remove duplicate condition we already checked for --- src/devices/ppu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/devices/ppu.c b/src/devices/ppu.c index 24a1a55..20c4abe 100644 --- a/src/devices/ppu.c +++ b/src/devices/ppu.c @@ -61,8 +61,7 @@ ppu_write(Ppu *p, Uint8 layer, Uint16 x, Uint16 y, Uint8 color) Uint8 pix = p->pixels[row]; Uint8 mask = ~(0x3 << shift); Uint8 pixnew = (pix & mask) + (color << shift); - if(x < p->width && y < p->height) - p->pixels[row] = pixnew; + p->pixels[row] = pixnew; if(pix != pixnew) p->reqdraw = 1; }