Commit 1d674588 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
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 9c8cb2ac
......@@ -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);
}
......
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