You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameter wasn't set optional so "-o -f" would fail for "-f" not being an integer.
I took the "2" from the comments.
(Stumbled over that when writing the bool parser ;)
diff --git a/find-cursor.c b/find-cursor.c
index 2caaf51..bce509e 100644
--- a/find-cursor.c+++ b/find-cursor.c@@ -157,7 +157,7 @@ int main(int argc, char* argv[]) {
extern int optopt;
int ch;
- while ((ch = getopt_long(argc, argv, ":hs:d:w:l:c:r:ft::go:O:", longopts, NULL)) != -1)+ while ((ch = getopt_long(argc, argv, ":hs:d:w:l:c:r:ft::go::O:", longopts, NULL)) != -1)
switch (ch) {
case 's':
size = parse_num(ch, optarg, argv[0]);
@@ -187,7 +187,7 @@ int main(int argc, char* argv[]) {
grow = 1;
break;
case 'o':
- outline = parse_num(ch, optarg, argv[0]);+ outline = optarg ? parse_num(ch, optarg, argv[0]) : 2;
break;
case 'O':
strncpy(ocolor_name, optarg, sizeof(ocolor_name));
The text was updated successfully, but these errors were encountered:
dnebauer
pushed a commit
to dnebauer/find-cursor
that referenced
this issue
Jan 11, 2025
As per github issue arp242#28 (<arp242#28>) the
-o parameter was not set optional, meaning "-o -f" fails because "-f" is not an
integer. The changes in this commit are taken from this issue.
The parameter wasn't set optional so "-o -f" would fail for "-f" not being an integer.
I took the "2" from the comments.
(Stumbled over that when writing the bool parser ;)
The text was updated successfully, but these errors were encountered: