Handle nr newlines

This commit is contained in:
Jan Möbius
2016-05-30 16:12:38 +02:00
parent 91ee22ca2f
commit b4cea6008d
2 changed files with 5 additions and 0 deletions

View File

@@ -1076,6 +1076,10 @@ bool _PLYReader_::can_u_read(std::istream& _is) const {
std::getline(_is, line);
trim(line);
// Handle '\r\n' newlines
const int s = line.size();
if( s > 0 && line[s - 1] == '\r') line.resize(s - 1);
//Check if this file is really a ply format
if (line != "PLY" && line != "ply")
return false;