From 12c628e82c32babf1233f5516dda15d588b94b2b Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:12:24 -0300 Subject: [PATCH] chore(ppu): resolve integer overflow regression --- src/ppu.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ppu.zig b/src/ppu.zig index 3170e28..33a669e 100644 --- a/src/ppu.zig +++ b/src/ppu.zig @@ -83,8 +83,8 @@ pub const Ppu = struct { const char_base: u32 = charblock_len * @as(u32, cbb); const screen_base: u32 = screenblock_len * @as(u32, sbb); - const vofs = self.bg[n].vofs.offset.read(); - const hofs = self.bg[n].hofs.offset.read(); + const vofs: u32 = self.bg[n].vofs.offset.read(); + const hofs: u32 = self.bg[n].hofs.offset.read(); const y = vofs + self.vcount.scanline.read();