From b78725f772489e925b618baf72fbedf69d42ac8e Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Sat, 17 Aug 2024 11:33:28 +1200 Subject: [PATCH] logcmd.cc: Quote stripping If a command has a single argument, and that argument is quoted, strip the quotes. --- passes/cmds/logcmd.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passes/cmds/logcmd.cc b/passes/cmds/logcmd.cc index 3b82ac48c..52f6b1e31 100644 --- a/passes/cmds/logcmd.cc +++ b/passes/cmds/logcmd.cc @@ -97,6 +97,9 @@ struct LogPass : public Pass { text += args[argidx] + ' '; if (!text.empty()) text.resize(text.size()-1); + if (text[0] == '"' && text[text.size()-1] == '"') + text = text.substr(1, text.size()-2); + const char *fmtline = newline ? "%s\n" : "%s"; if (to_stdout) fprintf(stdout, fmtline, text.c_str());