From beab7c968b478410a21be2b194fd10869d1398bc Mon Sep 17 00:00:00 2001 From: John Breaux Date: Sat, 29 Apr 2023 18:44:00 -0500 Subject: [PATCH] Fix copy paste errors and read-out-of-bounds check --- src/cpu/instruction.rs | 2 +- src/cpu/tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/instruction.rs b/src/cpu/instruction.rs index 58cbd9c..89646a7 100644 --- a/src/cpu/instruction.rs +++ b/src/cpu/instruction.rs @@ -137,7 +137,7 @@ pub enum Insn { /// | 00ff | Enter high-resolution mode #[opcode = "0x00ff"] hires, - /// | fx30 | Enter high-resolution mode + /// | fx30 | Load hires font address into vX #[opcode = "0xfx30"] hfont { x: usize }, /// | fx75 | Save to "flag registers" diff --git a/src/cpu/tests.rs b/src/cpu/tests.rs index 0c57fdf..9c856a9 100644 --- a/src/cpu/tests.rs +++ b/src/cpu/tests.rs @@ -1149,7 +1149,7 @@ mod behavior { fn invalid_pc() { let (mut cpu, mut bus) = setup_environment(); // The bus extends from 0x0..0x1000 - cpu.pc = 0xfff; + cpu.pc = 0x1001; match cpu.tick(&mut bus) { Err(Error::InvalidAddressRange { range }) => { eprintln!("InvalidAddressRange {{ {range:04x?} }}")