Avoid a division by zero when a value of 0 cylinder is returned.

This commit is contained in:
Christophe Grenier 2008-09-23 09:40:45 +02:00
parent 097c15512e
commit 3277ff9045

View file

@ -769,6 +769,8 @@ void update_disk_car_fields(disk_t *disk_car)
disk_car->geom.cylinders = cylinder_num; disk_car->geom.cylinders = cylinder_num;
} }
} }
if(disk_car->geom.cylinders == 0)
disk_car->geom.cylinders++;
disk_car->disk_size=disk_car->disk_real_size; disk_car->disk_size=disk_car->disk_real_size;
} }