Skip to content

Commit

Permalink
Merge pull request ya-mouse#26 from jwatt/jwatt
Browse files Browse the repository at this point in the history
Avoid accidental truncation of user specified sizes.
  • Loading branch information
ya-mouse authored Nov 16, 2022
2 parents 316981e + 51c91c0 commit ab78c48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fatresize.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ int main(int argc, char **argv) {

end = part_geom.start + opts.size / dev->sector_size;
printd(3, "ped_unit_parse(%llu)\n", end);
old_str = ped_unit_format(dev, part_geom.end);
def_str = ped_unit_format(dev, end);
old_str = ped_unit_format_custom(dev, part_geom.end, PED_UNIT_SECTOR);
def_str = ped_unit_format_custom(dev, end, PED_UNIT_SECTOR);
if (!strcmp(old_str, def_str)) {
range_end = ped_geometry_new(dev, part_geom.end, 1);
if (!range_end) {
Expand Down

0 comments on commit ab78c48

Please sign in to comment.