summaryrefslogtreecommitdiffstats
path: root/arguments.c
diff options
context:
space:
mode:
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 68690deb..54bc3593 100644
--- a/arguments.c
+++ b/arguments.c
@@ -211,6 +211,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);