]> err.no Git - util-linux/commitdiff
cfdisk: fix n+1 again
authorKarel Zak <kzak@redhat.com>
Mon, 9 Aug 2010 11:33:17 +0000 (13:33 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 9 Aug 2010 11:33:17 +0000 (13:33 +0200)
Reported-by: J B <jb.1234abcd@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk/cfdisk.c

index 610b84718c2bb82741f7eda8f0079f1938851a9a..8801a851f8750d2877188fa55be54be4bbde3090 100644 (file)
@@ -1659,7 +1659,7 @@ fill_p_info(void) {
                             bs, 1, &errmsg)) {
                                char *bad = _("Bad logical partition");
                                char *msg = (char *) xmalloc(strlen(bad) + strlen(errmsg) + 30);
-                               sprintf(msg, "%s %d: %s", bad, i + 1, errmsg);
+                               sprintf(msg, "%s %d: %s", bad, i, errmsg);
                                fatal(msg, 4);
                        }
                }