aboutsummaryrefslogtreecommitdiff
path: root/arguments.c
diff options
context:
space:
mode:
Diffstat (limited to 'arguments.c')
-rw-r--r--arguments.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arguments.c b/arguments.c
index e573249a..5b882ea1 100644
--- a/arguments.c
+++ b/arguments.c
@@ -216,8 +216,10 @@ args_escape(const char *s)
char *escaped, *result;
int flags;
- if (*s == '\0')
- return (xstrdup(s));
+ if (*s == '\0') {
+ xasprintf(&result, "''");
+ return (result);
+ }
if (s[0] != ' ' &&
(strchr(quoted, s[0]) != NULL || s[0] == '~') &&
s[1] == '\0') {