From a389baf116834b2664288ef7934dd0fd80b1c836 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 14 Oct 2014 16:44:54 +0200 Subject: [PATCH] libfdisk: (dos) fix N-1 error for partition size Signed-off-by: Karel Zak --- libfdisk/src/dos.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index f489fdf172..0ce032867d 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -1127,8 +1127,7 @@ static int add_partition(struct fdisk_context *cxt, size_t n, stop = stop * fdisk_get_units_per_sector(cxt) - 1; if (stop >limit) stop = limit; - } else - stop -= 1; + } } DBG(LABEL, ul_debug("DOS: raw stop: %ju", (uintmax_t) stop)); -- 2.47.2