Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ports-mgmt/dialog4ports: fix segfault
Fix segfault when moving selection in some dialog configurations Reported by: gad, kumba@gentoo.org Submitted by: rum1cro@yandex.ru (maintainer) PR: 244204
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- mixedlist.c_old 2021-01-03 16:01:52.851092000 +0300 | ||
+++ mixedlist.c 2021-01-03 16:06:04.266150000 +0300 | ||
@@ -652,12 +652,12 @@ | ||
break; | ||
case DLGK_ITEM_PREV: | ||
i = choice - 1; | ||
+ if (choice == 0 && scrollamt == 0) | ||
+ continue; | ||
if (items[scrollamt + i].type == ITEM_SEPARATOR && (scrollamt + i) == 0) | ||
i++; | ||
else if (items[scrollamt + i].type == ITEM_SEPARATOR) | ||
i--; | ||
- if (choice == 0 && scrollamt == 0) | ||
- continue; | ||
break; | ||
case DLGK_ITEM_NEXT: | ||
i = choice + 1; |