From 4bf659a1272fdf8d1e4d8213aa584adf591dad76 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Tue, 1 Jan 2013 07:04:48 -0800 Subject: Bail out of disassembly of a particular stream when we hit an invalid instruction --- dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dis.c') 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) { -- cgit v1.2.3