PLY Reader Fix: locking up when loading some binary files ( Thanks to Peter Newman for the patch)

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1042 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2014-05-07 11:43:53 +00:00
parent aee62d09d1
commit 48f18d6410

View File

@@ -938,14 +938,20 @@ bool _PLYReader_::can_u_read(std::istream& _is) const {
faceIndexType_ = ValueTypeUCHAR; faceIndexType_ = ValueTypeUCHAR;
} else { } else {
omerr() << "Unsupported Index type for face list: " << listIndexType << std::endl; omerr() << "Unsupported Index type for face list: " << listIndexType << std::endl;
return false;
} }
if (listEntryType == "int32") { if (listEntryType == "int32") {
faceEntryType_ = ValueTypeINT32; faceEntryType_ = ValueTypeINT32;
} else if (listEntryType == "int") { } else if (listEntryType == "int") {
faceEntryType_ = ValueTypeINT; faceEntryType_ = ValueTypeINT;
} else if (listEntryType == "uint32") {
faceEntryType_ = ValueTypeUINT32;
} else if (listEntryType == "uint") {
faceEntryType_ = ValueTypeUINT;
} else { } else {
omerr() << "Unsupported Entry type for face list: " << listEntryType << std::endl; omerr() << "Unsupported Entry type for face list: " << listEntryType << std::endl;
return false;
} }
} }