From 4ab0db3c0468d0944b87bdf87da5203050db9eb8 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Fri, 2 Nov 2018 12:08:43 +0100 Subject: Make sure to quote empty strings --- sdn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdn.cpp b/sdn.cpp index bf12889..13e2f0e 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -114,7 +114,7 @@ fun needs_shell_quoting (const string &v) -> bool { for (auto c : v) if (strchr ("|&;<>()$`\\\"' \t\n" "*?[#˜=%" "!", c)) return true; - return false; + return v.empty (); } fun shell_escape (const string &v) -> string { -- cgit v1.2.3-70-g09d2