Commit 2fb1c43a authored by Bill Hoffman's avatar Bill Hoffman

ENH: fix div by 0

parent a6c86cbd
......@@ -1549,7 +1549,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
<< "\t<PercentCoverage>";
covSumFile.setf(std::ios::fixed, std::ios::floatfield);
covSumFile.precision(2);
covSumFile << (percent_coverage/number_files)<< "</PercentCoverage>\n"
covSumFile << SAFEDIV(percent_coverage,number_files)<< "</PercentCoverage>\n"
<< "\t<EndDateTime>" << end_time << "</EndDateTime>\n";
covSumFile << "<ElapsedMinutes>" <<
static_cast<int>((cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment