From fd0812045a95559bc6abe9499f0bfcee90d3afbf Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 22 Jan 2023 19:57:26 +0000 Subject: Fix incorrect comparison. Restores ability to edit 'p'. --- sbin/disklabel/editor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/disklabel/editor.c') 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; } -- cgit v1.2.3