cmParseCoberturaCoverage: Initialize CurFileName to empty string

When the file is not found in $CMAKE_SOURCE_DIR/<file path>,
the CurFileName pointer remained set to the previous file.  This
caused the new file's coverage data to populate the into the
wrong object giving incorrect results and occasionally resulting
in a seg fault.
This commit is contained in:
Jonathan Beezley 2014-10-03 13:51:14 -04:00 committed by Brad King
parent 0e0cb710d0
commit 1c838addf5
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ protected:
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: "
<< atts[tagCount+1]<< std::endl);
std::string filename = atts[tagCount+1];
this->CurFileName = "";
for(size_t i=0;i < FilePaths.size();i++)
{
finalpath = FilePaths[i] + "/" + filename;