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);