diff options
| author | taitep <taitep@taitep.se> | 2025-10-07 20:16:27 +0200 |
|---|---|---|
| committer | taitep <taitep@taitep.se> | 2025-10-07 20:16:27 +0200 |
| commit | 361b36fbd1ba4a710abbc866da1c641545a6d53f (patch) | |
| tree | fc15d6dabe54100a299118a95d089a9f50965e7d /src/core.rs | |
| parent | dbd022f9c9e7409e74059224431f57de6bec7238 (diff) | |
Make sure unsupported/illegal instructions are caught
Diffstat (limited to 'src/core.rs')
| -rw-r--r-- | src/core.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core.rs b/src/core.rs index 8f6aaa7..9e82521 100644 --- a/src/core.rs +++ b/src/core.rs @@ -47,6 +47,8 @@ impl Core { } }; + assert_eq!(instr & 3, 3, "Compressed instructions not supported"); + let instr = Instruction(instr); let runner = find_runner(instr); @@ -65,6 +67,9 @@ impl Core { break; } } + } else { + eprintln!("Invalid Instruction"); + break; } } } |
