diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-30 14:24:55 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-30 14:24:55 +0100 |
commit | 9a17b853cd05f5aebf4075917f5f1b389f79c0c5 (patch) | |
tree | 0b2dba2ef76f08bb2f9df4ab36b4202d867d471b /src/satd-list.c | |
parent | the DEL char must be quoted (diff) | |
download | sat-9a17b853cd05f5aebf4075917f5f1b389f79c0c5.tar.gz sat-9a17b853cd05f5aebf4075917f5f1b389f79c0c5.tar.bz2 sat-9a17b853cd05f5aebf4075917f5f1b389f79c0c5.tar.xz |
empty arguments must be quoted too
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/satd-list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/satd-list.c b/src/satd-list.c index 0f0cfa9..53cbe06 100644 --- a/src/satd-list.c +++ b/src/satd-list.c @@ -49,6 +49,10 @@ quote(const char *str) const unsigned char *s; char *rc = NULL; + if (!*str) { + return strdup("''"); + } + for (s = (const unsigned char *)str; *s; s++) { if (*s < ' ') in++; else if (*s == 127) in++; |