Skip to content

Commit

Permalink
Merge pull request #1509 from tlaurion/whiptail_respect_lowercase_upp…
Browse files Browse the repository at this point in the history
…ercase_choices

newt(whiptail): fix code that was doing toupper of input
  • Loading branch information
tlaurion authored Oct 17, 2023
2 parents bd2a8eb + 498a78a commit f787867
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions patches/newt-0.52.20.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- ./listbox.c.orig 2023-10-11 15:26:20.365000000 -0400
+++ ./listbox.c 2023-10-11 15:27:26.762000000 -0400
@@ -652,7 +652,7 @@
for(i = 0, item = li->boxItems; item != NULL &&
i < li->currItem; i++, item = item->next);

- if (item && item->text && (toupper(*item->text) == toupper(ev.u.key))) {
+ if (item && item->text && *item->text == ev.u.key) {
item = item->next;
i++;
} else {
@@ -660,7 +660,7 @@
i = 0;
}
while (item && item->text &&
- toupper(*item->text) != toupper(ev.u.key)) {
+ *item->text != ev.u.key) {
item = item->next;
i++;
}

0 comments on commit f787867

Please sign in to comment.