From 46d4c0ce6e3d5f4f46ada01a6523629de79770ba Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 1 Mar 2014 17:07:33 -0800 Subject: Fix PC displacement mode check in disassembler so that jmps involving a register are handled correctly --- dis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dis.c') diff --git a/dis.c b/dis.c index 8ec5bb2..0b26e31 100644 --- a/dis.c +++ b/dis.c @@ -1,6 +1,6 @@ /* Copyright 2013 Michael Pavone - This file is part of BlastEm. + This file is part of BlastEm. BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. */ #include "68kinst.h" @@ -192,7 +192,7 @@ int main(int argc, char ** argv) if (is_visited(address)) { break; } - } else if (instbuf.src.addr_mode = MODE_PC_DISPLACE) { + } else if (instbuf.src.addr_mode == MODE_PC_DISPLACE) { address = instbuf.src.params.regs.displacement + instbuf.address + 2; encoded = filebuf + address/2; if (is_visited(address)) { -- cgit v1.2.3