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

View File

@ -361,7 +361,7 @@ STLGeometry * STLTopology ::Load (istream & ist)
// Check if there is a non-printable character in first 80 bytes
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);
}