Fix problem with create new partition size off by one sector (#596552)
With "Round to cylinders" deactivated, creating a new partition would create a partition that was one sector too large. Closes GParted bug #596552
This commit is contained in:
parent
d72a662925
commit
df541b8986
|
@ -171,7 +171,7 @@ Partition Dialog_Partition_New::Get_New_Partition()
|
|||
//FIXME: Partition size is limited to just less than 1024 TeraBytes due
|
||||
// to the maximum value of signed 4 byte integer.
|
||||
new_start = START + (Sector(spinbutton_before .get_value_as_int()) * MEBIBYTE) ;
|
||||
new_end = new_start + (Sector(spinbutton_size .get_value_as_int()) * MEBIBYTE) ;
|
||||
new_end = new_start + (Sector(spinbutton_size .get_value_as_int()) * MEBIBYTE) - 1 ;
|
||||
|
||||
/* due to loss of precision during calcs from Sector -> MiB and back, it is possible the new
|
||||
* partition thinks it's bigger then it can be. Here we try to solve this.*/
|
||||
|
|
Loading…
Reference in New Issue