Re: [hatari-devel] Zero divide in fdc.c

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On 05/04/2024 10.25, Thorsten Otto wrote:
With Falcon emulation and TOS 4.04, i get a zero divide (and core dump) in fdc.c:1531:

return ( ( EmulationDrives[Drive].nImageBytes / NUMBYTESPERSECTOR ) / SectorsPerTrack ) / SidesPerDisk;

SectorsPerTrack is zero at this point. Image is an empty 1.4MB empty floppy than can be accessed without error in EmuTOS.

Thanks, I fixed that now, there was indeed a sanity check missing here!

 Thomas




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/