Only one check suffices (if *buf, it's > 0)

This commit is contained in:
Arun Prakash Jana 2017-05-04 01:08:17 +05:30
parent a3852a6cb1
commit 58f8905ea3
No known key found for this signature in database
GPG key ID: A75979F35C080412

2
nnn.c
View file

@ -787,7 +787,7 @@ replace_escape(const char *str)
mbstowcs(wbuf, str, PATH_MAX); mbstowcs(wbuf, str, PATH_MAX);
while (*buf) { while (*buf) {
if ((*buf >= '\x01' && *buf <= '\x1f') || *buf == '\x7f') if (*buf <= '\x1f' || *buf == '\x7f')
*buf = '\?'; *buf = '\?';
buf++; buf++;