From 48f18d64108c5a7e5e5ddb95ed19c7dd64ea0651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 7 May 2014 11:43:53 +0000 Subject: [PATCH] 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 --- src/OpenMesh/Core/IO/reader/PLYReader.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/OpenMesh/Core/IO/reader/PLYReader.cc b/src/OpenMesh/Core/IO/reader/PLYReader.cc index cec6c1e0..65207d67 100644 --- a/src/OpenMesh/Core/IO/reader/PLYReader.cc +++ b/src/OpenMesh/Core/IO/reader/PLYReader.cc @@ -938,14 +938,20 @@ bool _PLYReader_::can_u_read(std::istream& _is) const { faceIndexType_ = ValueTypeUCHAR; } else { omerr() << "Unsupported Index type for face list: " << listIndexType << std::endl; + return false; } if (listEntryType == "int32") { faceEntryType_ = ValueTypeINT32; } else if (listEntryType == "int") { faceEntryType_ = ValueTypeINT; + } else if (listEntryType == "uint32") { + faceEntryType_ = ValueTypeUINT32; + } else if (listEntryType == "uint") { + faceEntryType_ = ValueTypeUINT; } else { omerr() << "Unsupported Entry type for face list: " << listEntryType << std::endl; + return false; } }