diff options
author | Mike Pavone <pavone@retrodev.com> | 2012-12-12 21:25:31 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2012-12-12 21:25:31 -0800 |
commit | 57653b3f2873b59cbcf0f86858143523b74f5de7 (patch) | |
tree | d48cc9e80954167ea21d9e31af0b17e07cb81d70 /dis.c | |
parent | d1fc71b12e97f6397f781565c44a6ee84441b2b5 (diff) |
Don't try to disassemble addresses beyond the end of the cartridge
Diffstat (limited to 'dis.c')
-rw-r--r-- | dis.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -76,6 +76,9 @@ int main(int argc, char ** argv) break; } for(;;) { + if (address > filesize) { + break; + } visit(address); next = m68k_decode(encoded, &instbuf, address); address += (next-encoded)*2; |