diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-01-01 07:04:48 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-01-01 07:04:48 -0800 |
commit | 4bf659a1272fdf8d1e4d8213aa584adf591dad76 (patch) | |
tree | 699377061be73b425be60a6ac864f2ec2acd7957 | |
parent | c4da2fe1076da713fc081679f9af37948bb6f958 (diff) |
Bail out of disassembly of a particular stream when we hit an invalid instruction
-rw-r--r-- | dis.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |