mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
cr16b: Fix disassembler crashing on invalid 0x15E0 opcode
This commit is contained in:
parent
11ed5d1cf6
commit
410918f2ab
@ -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 ";
|
||||
|
Loading…
Reference in New Issue
Block a user