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
|
/// of the Gameboy's memory, and should not be relied upon for anything other than development
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Memory {
|
pub struct Memory {
|
||||||
data: [u8; MAX_MEMORY_ADDRESS],
|
data: [u8; MAX_MEMORY_ADDRESS + 1],
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Memory {
|
impl Memory {
|
||||||
|
@ -67,7 +67,7 @@ impl Memory {
|
||||||
impl Default for Memory {
|
impl Default for Memory {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
data: [0_u8; MAX_MEMORY_ADDRESS],
|
data: [0_u8; MAX_MEMORY_ADDRESS + 1],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue