Skip to content
Snippets Groups Projects
Commit 61f9f0bd authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Dave DeMarle
Browse files

BUG #13101. STL ascii reader was report failures prematurely.

STL ascii reader was reporting error when eof was reached at an expected
location. This was causing the reader to fail for the STL file attached with the
bug report.

Change-Id: I734d2c8d8c85854df3d2a63bae6ba23bccf7a9c2
parent 65a6fa77
No related branches found
No related tags found
No related merge requests found
......@@ -442,12 +442,15 @@ int vtkSTLReader::ReadASCIISTL(FILE *fp, vtkPoints *newPts,
{
if (!fgets(line, 255, fp))
{
vtkErrorMacro ("STLReader error reading file: " << this->FileName
<< " Premature EOF while reading end solid.");
fclose(fp);
return 0;
done = feof(fp);
if (!done)
{
vtkErrorMacro ("STLReader error reading file: " << this->FileName
<< " Premature EOF while reading end solid.");
fclose(fp);
return 0;
}
}
done = feof(fp);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment