summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.stanford.edu>2017-01-11 11:03:22 -0800
committerGitHub <noreply@github.com>2017-01-11 11:03:22 -0800
commit13dee9ff9189134158ff21524e7ecc73dcdce971 (patch)
tree660d07973a7505e44279f2d6f5b6edd32cedc2b8
parentff498bb43b3d3785bdb894974678e65926de62ab (diff)
parentf5eff29054e3eb70ef0e04516b4bd7e49f28db79 (diff)
Merge pull request #127 from cristian-mattarei/issue_679
Bug 679 fix
-rw-r--r--src/main/command_executor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp
index 64025fc04..ebb57da74 100644
--- a/src/main/command_executor.cpp
+++ b/src/main/command_executor.cpp
@@ -254,7 +254,9 @@ void CommandExecutor::printStatsFilterZeros(std::ostream& out,
std::getline(iss, statValue, '\n');
double curFloat;
- bool isFloat = static_cast<bool>(std::istringstream(statValue) >> curFloat);
+ std::istringstream iss_stat_value (statValue);
+ iss_stat_value >> curFloat;
+ bool isFloat = iss_stat_value.good();
if( (isFloat && curFloat == 0) ||
statValue == " \"0\"" ||
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback