summaryrefslogtreecommitdiffstats
path: root/arguments.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-06-20 09:02:26 +0100
committerThomas Adam <thomas@xteddy.org>2019-06-20 09:02:26 +0100
commit03945276f7010a69969714f8b581d68ee9ff92ba (patch)
treee09fa390d09df02ebc31e696bce5db733013ba12 /arguments.c
parentb3ca410bc398e9aa7a045cf1337ca3f08c005e6e (diff)
parentcd1fc42df6d1bacac4f617e031c279ba31bc0632 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'arguments.c')
-rw-r--r--arguments.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arguments.c b/arguments.c
index c8a6ab45..f7b6cbe1 100644
--- a/arguments.c
+++ b/arguments.c
@@ -212,7 +212,9 @@ args_escape(const char *s)
if (*s == '\0')
return (xstrdup(s));
- if ((strchr(quoted, s[0]) != NULL || s[0] == '~') && s[1] == '\0') {
+ if (s[0] != ' ' &&
+ (strchr(quoted, s[0]) != NULL || s[0] == '~') &&
+ s[1] == '\0') {
xasprintf(&escaped, "\\%c", s[0]);
return (escaped);
}