fix(bus): fix off by one error when reading from boot rom

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-03-23 21:01:33 -05:00
parent e5fb07c4d1
commit 48ac8317a8
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ impl Bus {
match addr { match addr {
0x0000..=0x3FFF => { 0x0000..=0x3FFF => {
// 16KB ROM bank 00 // 16KB ROM bank 00
if addr < 0x00FF { if addr < 0x100 {
if let Some(boot) = self.boot { if let Some(boot) = self.boot {
return boot[addr as usize]; return boot[addr as usize];
} }