Skip to content

Commit f787867

Browse files
authored
Merge pull request #1509 from tlaurion/whiptail_respect_lowercase_uppercase_choices
newt(whiptail): fix code that was doing toupper of input
2 parents bd2a8eb + 498a78a commit f787867

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

patches/newt-0.52.20.patch

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- ./listbox.c.orig 2023-10-11 15:26:20.365000000 -0400
2+
+++ ./listbox.c 2023-10-11 15:27:26.762000000 -0400
3+
@@ -652,7 +652,7 @@
4+
for(i = 0, item = li->boxItems; item != NULL &&
5+
i < li->currItem; i++, item = item->next);
6+
7+
- if (item && item->text && (toupper(*item->text) == toupper(ev.u.key))) {
8+
+ if (item && item->text && *item->text == ev.u.key) {
9+
item = item->next;
10+
i++;
11+
} else {
12+
@@ -660,7 +660,7 @@
13+
i = 0;
14+
}
15+
while (item && item->text &&
16+
- toupper(*item->text) != toupper(ev.u.key)) {
17+
+ *item->text != ev.u.key) {
18+
item = item->next;
19+
i++;
20+
}

0 commit comments

Comments
 (0)