summaryrefslogtreecommitdiffstats
path: root/arguments.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-05-28 21:02:28 +0100
committerThomas Adam <thomas@xteddy.org>2019-05-28 21:02:28 +0100
commitc96957583f0ff2e377fcbe08ca1a7d88ab071380 (patch)
treef04e751eedc8787eb837d7aec79ae5d08463f80e /arguments.c
parente7a530fe4c0f8e0f807daf6a1b80d86c67c93e1b (diff)
parent580cd16f4c3474d7cae867b9b24f01665a268e9d (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'arguments.c')
-rw-r--r--arguments.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arguments.c b/arguments.c
index 829a5ef3..38e50829 100644
--- a/arguments.c
+++ b/arguments.c
@@ -210,6 +210,8 @@ args_escape(const char *s)
char *escaped, *result;
int flags;
+ if (*s == '\0')
+ return (xstrdup(s));
if ((strchr(quoted, s[0]) != NULL || s[0] == '~') && s[1] == '\0') {
xasprintf(&escaped, "\\%c", s[0]);
return (escaped);