From 5d7c55c7af385adb048ac361fc23b8bb4eea3258 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 25 May 2015 09:27:07 -0400 Subject: [PATCH] Bug: ::execute concatenates output - The ::execute function concatenates output to the std::string provided, which is almost never wanted. Now it clears first. --- src/util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.cpp b/src/util.cpp index f528418..c8df147 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -99,6 +99,7 @@ int execute ( close (pin[1]); } + output = ""; read_retval = -1; written = 0; while (read_retval != 0 || input.size () != written)