Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix menu input handling in text UI - sacc - sacc(omys), simple console gopher c…
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65…
Log
Files
Refs
Tags
LICENSE
---
commit 38704075332efd50523896ea0ae68275b7fe0a0f
parent f1216bbc6ea47edb1b8ca655ed7c2ebadaccce33
Author: Quentin Rameau <[email protected]>
Date: Fri, 1 Sep 2017 15:24:47 +0200
Fix menu input handling in text UI
Also fix a typo introduced in 3eabb27
Diffstat:
M ui_txt.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/ui_txt.c b/ui_txt.c
@@ -172,10 +172,10 @@ uiselectitem(Item *entry)
return NULL;
nitems = dir ? dir->nitems : 0;
- if (!c)
- c = 'h';
for (;;) {
+ if (!c)
+ c = 'h';
printstatus(entry, c);
fflush(stdout);
@@ -244,10 +244,7 @@ uiselectitem(Item *entry)
continue;
}
- if (*buf < '0' || *buf > '9')
- continue;
-
- if (item > 0 && item <= nitems);
+ if (item >= 0 && item <= nitems)
break;
}
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.