mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Fix #185
This commit is contained in:
parent
bd30e41254
commit
244ba9f953
|
@ -181,6 +181,7 @@ disabledbg()
|
||||||
#define HOME_LEN_MAX 64
|
#define HOME_LEN_MAX 64
|
||||||
#define CTX_MAX 4
|
#define CTX_MAX 4
|
||||||
#define DOT_FILTER_LEN 7
|
#define DOT_FILTER_LEN 7
|
||||||
|
#define ASCII_MAX 128
|
||||||
|
|
||||||
/* Macros to define process spawn behaviour as flags */
|
/* Macros to define process spawn behaviour as flags */
|
||||||
#define F_NONE 0x00 /* no flag set */
|
#define F_NONE 0x00 /* no flag set */
|
||||||
|
@ -1219,7 +1220,7 @@ static int filterentries(char *path)
|
||||||
|
|
||||||
if (r == OK) {
|
if (r == OK) {
|
||||||
/* Handle all control chars in main loop */
|
/* Handle all control chars in main loop */
|
||||||
if (keyname(*ch)[0] == '^' && *ch != '^') {
|
if (*ch < ASCII_MAX && keyname(*ch)[0] == '^' && *ch != '^') {
|
||||||
if (len == 1)
|
if (len == 1)
|
||||||
cur = oldcur;
|
cur = oldcur;
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -1363,7 +1364,7 @@ static char *xreadline(char *prefill, char *prompt)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Filter out all other control chars */
|
/* Filter out all other control chars */
|
||||||
if (keyname(*ch)[0] == '^')
|
if (*ch < ASCII_MAX && keyname(*ch)[0] == '^')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (pos < NAME_MAX - 1) {
|
if (pos < NAME_MAX - 1) {
|
||||||
|
|
Loading…
Reference in a new issue