1
0
mirror of https://github.com/NGSolve/netgen.git synced 2025-04-23 06:42:04 +05:00

Handle CR and other space characters correctly when loading STL files

This commit is contained in:
Matthias Hochsteger 2019-09-30 13:08:39 +02:00
parent 7becf20ebd
commit b3c64a0607

@ -361,7 +361,7 @@ STLGeometry * STLTopology ::Load (istream & ist)
// Check if there is a non-printable character in first 80 bytes // Check if there is a non-printable character in first 80 bytes
for (auto i : Range(istart, buflen)) for (auto i : Range(istart, buflen))
if(std::isprint(buf[i])==0 && buf[i]!='\n') if(std::isprint(buf[i])==0 && std::isspace(buf[i])==0)
return LoadBinary(ist); return LoadBinary(ist);
} }