diff --git a/source/Irrlicht/CPLYMeshFileLoader.cpp b/source/Irrlicht/CPLYMeshFileLoader.cpp index 03b3e47..94674c6 100644 --- a/source/Irrlicht/CPLYMeshFileLoader.cpp +++ b/source/Irrlicht/CPLYMeshFileLoader.cpp @@ -230,7 +230,7 @@ IAnimatedMesh* CPLYMeshFileLoader::createMesh(io::IReadFile* file) if (continueReading) { // create a mesh buffer - CDynamicMeshBuffer *mb = new CDynamicMeshBuffer(video::EVT_STANDARD, vertCount > 65565 ? video::EIT_32BIT : video::EIT_16BIT); + CDynamicMeshBuffer *mb = new CDynamicMeshBuffer(video::EVT_STANDARD, vertCount > 65535 ? video::EIT_32BIT : video::EIT_16BIT); mb->getVertexBuffer().reallocate(vertCount); mb->getIndexBuffer().reallocate(vertCount); mb->setHardwareMappingHint(EHM_STATIC);