diff options
author | 2019-01-04 19:36:03 +0530 | |
---|---|---|
committer | 2019-01-04 19:37:57 +0530 | |
commit | 244ba9f953c8036f2c1dd17006baec81ce1fbb42 (patch) | |
tree | f3a41f59037ad4b421d6c3dc13b95f102ece8d06 | |
parent | bd30e412547869e7ebe6d67a5d58db7fa0f1ea24 (diff) | |
download | nnn-244ba9f953c8036f2c1dd17006baec81ce1fbb42.tar.gz |
Fix #185
-rw-r--r-- | src/nnn.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -181,6 +181,7 @@ disabledbg() #define HOME_LEN_MAX 64 #define CTX_MAX 4 #define DOT_FILTER_LEN 7 +#define ASCII_MAX 128 /* Macros to define process spawn behaviour as flags */ #define F_NONE 0x00 /* no flag set */ @@ -1219,7 +1220,7 @@ static int filterentries(char *path) if (r == OK) { /* Handle all control chars in main loop */ - if (keyname(*ch)[0] == '^' && *ch != '^') { + if (*ch < ASCII_MAX && keyname(*ch)[0] == '^' && *ch != '^') { if (len == 1) cur = oldcur; goto end; @@ -1363,7 +1364,7 @@ static char *xreadline(char *prefill, char *prompt) } /* Filter out all other control chars */ - if (keyname(*ch)[0] == '^') + if (*ch < ASCII_MAX && keyname(*ch)[0] == '^') continue; if (pos < NAME_MAX - 1) { |