From f9c55c71b60ebbba104fe8b43c7c1e33a2af3136 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 16 Oct 2010 02:21:44 +0000 Subject: [PATCH] Fix an error I added in formatScriptOutput. It caused a segmentation fault when a script produced an empty string as a result. --- output.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output.cc b/output.cc index b8d79fe4d..43def4d33 100644 --- a/output.cc +++ b/output.cc @@ -439,7 +439,7 @@ static char *formatScriptOutput(ScriptResult sr) { } if (lines.empty()) - lines[0] = ""; + lines.push_back(""); for (i = 0; i < lines.size(); i++) { if (i < lines.size() - 1) result += "| ";