diff --git a/src/memory.rs b/src/memory.rs index 8665c6e..78500b8 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -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], } } }