diff --git a/src/OpenMesh/Core/IO/reader/PLYReader.cc b/src/OpenMesh/Core/IO/reader/PLYReader.cc index d1e6898b..db431c14 100644 --- a/src/OpenMesh/Core/IO/reader/PLYReader.cc +++ b/src/OpenMesh/Core/IO/reader/PLYReader.cc @@ -976,6 +976,8 @@ void _PLYReader_::readInteger(ValueType _type, std::istream& _in, T& _value) con static_assert(std::is_integral::value, "Integral required."); + int16_t tmp_int16_t; + uint16_t tmp_uint16_t; int32_t tmp_int32_t; uint32_t tmp_uint32_t; int8_t tmp_char; @@ -983,6 +985,22 @@ void _PLYReader_::readInteger(ValueType _type, std::istream& _in, T& _value) con switch (_type) { + case ValueTypeINT16: + + case ValueTypeSHORT: + restore(_in, tmp_int16_t, options_.check(Options::MSB)); + _value = tmp_int16_t; + + break; + + case ValueTypeUINT16: + + case ValueTypeUSHORT: + restore(_in, tmp_uint16_t, options_.check(Options::MSB)); + _value = tmp_uint16_t; + + break; + case ValueTypeINT: case ValueTypeINT32: