summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-01-01 07:04:48 -0800
committerMike Pavone <pavone@retrodev.com>2013-01-01 07:04:48 -0800
commit4bf659a1272fdf8d1e4d8213aa584adf591dad76 (patch)
tree699377061be73b425be60a6ac864f2ec2acd7957
parentc4da2fe1076da713fc081679f9af37948bb6f958 (diff)
Bail out of disassembly of a particular stream when we hit an invalid instruction
-rw-r--r--dis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dis.c b/dis.c
index 2c16cf3..8ff44e4 100644
--- a/dis.c
+++ b/dis.c
@@ -133,7 +133,7 @@ int main(int argc, char ** argv)
//printf("%X: %s\n", instbuf.address, disbuf);
check_reference(&instbuf, &(instbuf.src));
check_reference(&instbuf, &(instbuf.dst));
- if (instbuf.op == M68K_ILLEGAL || instbuf.op == M68K_RTS || instbuf.op == M68K_RTE) {
+ if (instbuf.op == M68K_ILLEGAL || instbuf.op == M68K_RTS || instbuf.op == M68K_RTE || instbuf.op == M68K_INVALID) {
break;
} else if (instbuf.op == M68K_BCC || instbuf.op == M68K_DBCC || instbuf.op == M68K_BSR) {
if (instbuf.op == M68K_BCC && instbuf.extra.cond == COND_TRUE) {