cr16b: Fix disassembler crashing on invalid 0x15E0 opcode

This commit is contained in:
AJR 2020-12-10 11:58:42 -05:00
parent 11ed5d1cf6
commit 410918f2ab

View File

@ -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 ";