From 9a17b853cd05f5aebf4075917f5f1b389f79c0c5 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 30 Dec 2015 14:24:55 +0100 Subject: empty arguments must be quoted too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/satd-list.c | 4 ++++ 1 file changed, 4 insertions(+) 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++; -- cgit v1.2.3-70-g09d2