From: krw Date: Sun, 22 Jan 2023 19:57:25 +0000 (+0000) Subject: Fix incorrect comparison. Restores ability to edit 'p'. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=715dd5c0a24d35bd6649476290b991d4694e2f58;p=openbsd Fix incorrect comparison. Restores ability to edit 'p'. --- diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index cd1a13e8019..dbc73f6a033 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.395 2023/01/21 16:20:25 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.396 2023/01/22 19:57:25 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -1059,7 +1059,7 @@ getpartno(const struct disklabel *lp, const char *id, const char *action) goto done; } - if (strlen(p) > 1 || *p < 'a' || *p >= maxpart || *p == 'c') { + if (strlen(p) > 1 || *p < 'a' || *p > maxpart || *p == 'c') { fprintf(stderr, helpfmt, maxpart); goto done; }