summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-01-06 21:44:54 -0800
committerMike Pavone <pavone@retrodev.com>2013-01-06 21:44:54 -0800
commitb1f04ec182a1cfbdcfb6fbc52b0c45a0182494e5 (patch)
treee305e05bf11403106d9b3e618f123489e0591f97
parentbb95ed38345859df9ac367c166c46a56e6f752e1 (diff)
Make sure we bail out of translation after translating an invalid instruction
-rw-r--r--m68k_to_x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/m68k_to_x86.c b/m68k_to_x86.c
index 1c13812..0561c4c 100644
--- a/m68k_to_x86.c
+++ b/m68k_to_x86.c
@@ -3524,7 +3524,7 @@ uint8_t * translate_m68k_stream(uint32_t address, m68k_context * context)
//m68k_disasm(&instbuf, disbuf);
//printf("%X: %s\n", instbuf.address, disbuf);
dst = translate_m68k(dst, &instbuf, opts);
- } while(instbuf.op != M68K_ILLEGAL && instbuf.op != M68K_TRAP && instbuf.op != M68K_RTS && instbuf.op != M68K_RTR && instbuf.op != M68K_RTE && !(instbuf.op == M68K_BCC && instbuf.extra.cond == COND_TRUE) && instbuf.op != M68K_JMP);
+ } while(instbuf.op != M68K_ILLEGAL && instbuf.op != M68K_INVALID && instbuf.op != M68K_TRAP && instbuf.op != M68K_RTS && instbuf.op != M68K_RTR && instbuf.op != M68K_RTE && !(instbuf.op == M68K_BCC && instbuf.extra.cond == COND_TRUE) && instbuf.op != M68K_JMP);
process_deferred(opts);
if (opts->deferred) {
address = opts->deferred->address;