From 410918f2ab6cc9800a5a0796a7842cc0cba2f1da Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 10 Dec 2020 11:58:42 -0500 Subject: [PATCH] cr16b: Fix disassembler crashing on invalid 0x15E0 opcode --- src/devices/cpu/cr16b/cr16bdasm.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/devices/cpu/cr16b/cr16bdasm.cpp b/src/devices/cpu/cr16b/cr16bdasm.cpp index 528c817f845..a39a181b240 100644 --- a/src/devices/cpu/cr16b/cr16bdasm.cpp +++ b/src/devices/cpu/cr16b/cr16bdasm.cpp @@ -20,15 +20,8 @@ ***************************************************************************/ #include "emu.h" -#include "util/disasmintf.h" #include "cr16bdasm.h" -#include "util/strformat.h" - -using osd::u32; -using util::BIT; -using offs_t = u32; - cr16b_disassembler::cr16b_disassembler(cr16_arch arch) : util::disasm_interface() , m_arch(arch) @@ -568,7 +561,7 @@ offs_t cr16b_disassembler::disassemble(std::ostream &stream, offs_t pc, const cr case 0x1400: // Conditional or unconditional branch to small address - if ((opcode & 0x000e) == 0x000e || (opcode & 0x01e0) != 0x01e0) + if ((opcode & 0x000e) == 0x000e && (opcode & 0x01e0) != 0x01e0) { if ((opcode & 0x01e0) == 0x01c0) stream << "br ";