diff options
Diffstat (limited to 'libmisc/quote.c')
-rw-r--r-- | libmisc/quote.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmisc/quote.c b/libmisc/quote.c index 633f941..fdd3af9 100644 --- a/libmisc/quote.c +++ b/libmisc/quote.c @@ -31,6 +31,9 @@ const char *quote(const char *str) char *q; size_t nonpr; + if (!str) + return str; + for (nonpr = 0, s = (unsigned char *)str; *s != '\0'; s++) if (!isprint(*s) || isspace(*s) || *s == '\\') nonpr++; |