mirror of
https://github.com/holub/mame
synced 2025-10-07 09:25:34 +03:00
dsk_dsk: Don't segfault on empty tracks (fixes einstein 4game)
This commit is contained in:
parent
ad13bddaf6
commit
b4e8282023
@ -398,6 +398,11 @@ bool dsk_format::load(io_generic *io, uint32_t form_factor, floppy_image *image)
|
|||||||
continue;
|
continue;
|
||||||
track_header tr;
|
track_header tr;
|
||||||
io_generic_read(io, &tr,track_offsets[(track<<1)+side],sizeof(tr));
|
io_generic_read(io, &tr,track_offsets[(track<<1)+side],sizeof(tr));
|
||||||
|
|
||||||
|
// skip if there are no sectors in this track
|
||||||
|
if (tr.number_of_sector == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
desc_pc_sector sects[256];
|
desc_pc_sector sects[256];
|
||||||
uint8_t sect_data[65536];
|
uint8_t sect_data[65536];
|
||||||
int sdatapos = 0;
|
int sdatapos = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user