Mercurial > repos > blastem
diff dis.c @ 2146:0c0d4233d826
Fix SP end address in disassembler
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 26 Mar 2022 20:10:21 -0700 |
parents | 7451f970ee66 |
children | 4c265d2f6c88 |
line wrap: on
line diff
--- a/dis.c Sat Mar 26 02:01:55 2022 -0700 +++ b/dis.c Sat Mar 26 20:10:21 2022 -0700 @@ -341,7 +341,7 @@ do_cd_labels = 1; } else { uint32_t sub_start =filebuf[0x40/2] << 16 | filebuf[0x42/2]; - uint32_t sub_end =filebuf[0x44/2] << 16 | filebuf[0x46/2]; + uint32_t sub_end = sub_start + (filebuf[0x44/2] << 16 | filebuf[0x46/2]); if (sub_start > (boot_size - 0x20)) { fprintf(stderr, "System Program start offset is %X, but image is only %X bytes\n", sub_start, (uint32_t)boot_size); return 1;