summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2014-03-01 17:07:33 -0800
committerMichael Pavone <pavone@retrodev.com>2014-03-01 17:07:33 -0800
commit46d4c0ce6e3d5f4f46ada01a6523629de79770ba (patch)
treebfad970c8451d3a128efe7dd05b4fb874b46426a
parent98ce28ba0adb770e0ac29e1f9822b675ef914769 (diff)
Fix PC displacement mode check in disassembler so that jmps involving a register are handled correctly
-rw-r--r--dis.c4
1 files changed, 2 insertions, 2 deletions
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)) {