PVS: V1024 The 'file' stream is checked for EOF before reading from it, but is not checked after reading. Potential use of invalid data
This commit is contained in:
@@ -154,9 +154,8 @@ void QGISVGTemplate::createClickHandles(void)
|
||||
|
||||
//read all of PageResult into oStream (except the DrawingContent marker comment - why??)
|
||||
std::ifstream ifile (fi.filePath().c_str());
|
||||
while (!ifile.eof())
|
||||
while (std::getline(ifile,line))
|
||||
{
|
||||
std::getline(ifile,line);
|
||||
// check if the marker in the template is found
|
||||
if(line.find("<!-- DrawingContent -->") == std::string::npos) {
|
||||
// if not - write line to oStream
|
||||
|
||||
Reference in New Issue
Block a user