From 0c344037f0df8130cddd332ba78da4915e03fa68 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 14 Oct 2014 17:26:27 +0200 Subject: [PATCH] libfdisk: (gpt) fix N-1 error for partition size The same bug like on dos.c, the limits for the "last sector" dialog are already with "-1". Signed-off-by: Karel Zak --- libfdisk/src/gpt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index f23e7f6e87..e695bea9d3 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -2031,8 +2031,7 @@ static int gpt_add_partition( if (user_l + (cxt->grain / cxt->sector_size) > dflt_l) user_l = dflt_l; */ - } else - user_l -= 1; + } if (user_l > user_f && user_l <= disk_l) break; -- 2.47.3