diff options
Diffstat (limited to 'src/main/command_executor.cpp')
-rw-r--r-- | src/main/command_executor.cpp | 4 |
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\"" || |