chore(ppu): resolve integer overflow regression

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-21 05:12:24 -03:00
parent 5f9abf69d3
commit 12c628e82c
1 changed files with 2 additions and 2 deletions

View File

@ -83,8 +83,8 @@ pub const Ppu = struct {
const char_base: u32 = charblock_len * @as(u32, cbb); const char_base: u32 = charblock_len * @as(u32, cbb);
const screen_base: u32 = screenblock_len * @as(u32, sbb); const screen_base: u32 = screenblock_len * @as(u32, sbb);
const vofs = self.bg[n].vofs.offset.read(); const vofs: u32 = self.bg[n].vofs.offset.read();
const hofs = self.bg[n].hofs.offset.read(); const hofs: u32 = self.bg[n].hofs.offset.read();
const y = vofs + self.vcount.scanline.read(); const y = vofs + self.vcount.scanline.read();