Help freeloader stop crashing from divide-by-zero, provoked by drain-bamaged BIOS.

svn path=/trunk/; revision=13339
This commit is contained in:
Mike Nordell 2005-01-27 21:12:05 +00:00
parent 2829fb845f
commit 60d9e9aa67

View file

@ -146,7 +146,9 @@ static BOOL PcDiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 S
//
// Get the drive geometry
//
if (!MachDiskGetDriveGeometry(DriveNumber, &DriveGeometry))
if (!MachDiskGetDriveGeometry(DriveNumber, &DriveGeometry) ||
DriveGeometry.Sectors == 0 ||
DriveGeometry.Heads == 0)
{
return FALSE;
}