Release note export to HTML/TXT
[foam-extend-3.2.git] / ThirdParty / rpmBuild / SOURCES / ParaView-3.14.1.patch_2
blobe47ee6e17f807cfb9a438b8c96840a0458e124ed
1 From 1d6745888bcc34b260410a3cdbba49ecf0084ba2 Mon Sep 17 00:00:00 2001
2 From: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
3 Date: Tue, 17 Apr 2012 14:54:05 -0400
4 Subject: [PATCH] BUG #13101. STL ascii reader was report failures prematurely.
6 STL ascii reader was reporting error when eof was reached at an expected
7 location. This was causing the reader to fail for the STL file attached with the
8 bug report.
10 Change-Id: I734d2c8d8c85854df3d2a63bae6ba23bccf7a9c2
11 ---
12  IO/vtkSTLReader.cxx |   13 ++++++++-----
13  1 files changed, 8 insertions(+), 5 deletions(-)
15 diff --git a/IO/vtkSTLReader.cxx b/IO/vtkSTLReader.cxx
16 index 189ea1b..34ee3e0 100644
17 --- a/VTK/IO/vtkSTLReader.cxx
18 +++ b/VTK/IO/vtkSTLReader.cxx
19 @@ -442,12 +442,15 @@ int vtkSTLReader::ReadASCIISTL(FILE *fp, vtkPoints *newPts,
20          {
21          if (!fgets(line, 255, fp))
22            {
23 -          vtkErrorMacro ("STLReader error reading file: " << this->FileName
24 -                         << " Premature EOF while reading end solid.");
25 -          fclose(fp);
26 -          return 0;
27 +          done = feof(fp);
28 +          if (!done)
29 +            {
30 +            vtkErrorMacro ("STLReader error reading file: " << this->FileName
31 +              << " Premature EOF while reading end solid.");
32 +            fclose(fp);
33 +            return 0;
34 +            }
35            }
37          done = feof(fp);
38          }
40 -- 
41 1.7.4.1