summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util.c b/util.c
index 24f38b5..f4304ec 100644
--- a/util.c
+++ b/util.c
@@ -93,9 +93,8 @@ encodeuri(char *buf, size_t bufsiz, const char *s)
size_t i, b;
for (i = 0, b = 0; s[i]; i++) {
- if (s[i] == ' ' ||
- (unsigned char)s[i] > 127 ||
- iscntrl((unsigned char)s[i])) {
+ if ((unsigned char)s[i] <= ' ' ||
+ (unsigned char)s[i] >= 127) {
if (b + 3 >= bufsiz)
return -1;
buf[b++] = '%';