Commit 0e0674a3 authored by Dave DeMarle's avatar Dave DeMarle

Merge branch '13101_fix_stl_ascii_reader_rel' into release

Change-Id: I83d02922b9bf812a09361725cd670168b8b395d6
parents 1dfe95d3 7e34e013
......@@ -442,12 +442,17 @@ 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;
// if fgets() returns an error, it may be due to the fact that the EOF
// is reached (BUG #13101) hence we test again.
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