fix a crash while using the -s option;

the -s option requires an argument to be passed so add a leading : to
getopt_long()
This commit is contained in:
robert 2020-04-19 12:43:42 +00:00
parent c11ec45736
commit 77b5c16af3
2 changed files with 16 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.19 2019/07/12 20:49:43 sthen Exp $
# $OpenBSD: Makefile,v 1.20 2020/04/19 12:43:42 robert Exp $
COMMENT = interactive process viewer
V = 2.2.0
DISTNAME = htop-${V}
REVISION = 13
REVISION = 14
CATEGORIES = sysutils

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-htop_c,v 1.1 2020/04/19 12:43:43 robert Exp $
Index: htop.c
--- htop.c.orig
+++ htop.c
@@ -93,7 +93,7 @@ static CommandLineSettings parseArguments(int argc, ch
int opt, opti=0;
/* Parse arguments */
- while ((opt = getopt_long(argc, argv, "hvCst::d:u:p:i", long_opts, &opti))) {
+ while ((opt = getopt_long(argc, argv, "hvCs:t::d:u:p:i", long_opts, &opti))) {
if (opt == EOF) break;
switch (opt) {
case 'h':