Fix bug where address 0xFFFF was not accessible
parent
e42303d31a
commit
7554438c7a
|
@ -18,7 +18,7 @@ pub enum Error {
|
|||
/// of the Gameboy's memory, and should not be relied upon for anything other than development
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Memory {
|
||||
data: [u8; MAX_MEMORY_ADDRESS],
|
||||
data: [u8; MAX_MEMORY_ADDRESS + 1],
|
||||
}
|
||||
|
||||
impl Memory {
|
||||
|
@ -67,7 +67,7 @@ impl Memory {
|
|||
impl Default for Memory {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
data: [0_u8; MAX_MEMORY_ADDRESS],
|
||||
data: [0_u8; MAX_MEMORY_ADDRESS + 1],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue