diff --git a/src/modules/voxelformat/MeshFormat.cpp b/src/modules/voxelformat/MeshFormat.cpp index 8ae90910b..dbdac7e46 100644 --- a/src/modules/voxelformat/MeshFormat.cpp +++ b/src/modules/voxelformat/MeshFormat.cpp @@ -89,7 +89,7 @@ void MeshFormat::voxelizeTris(voxel::RawVolume *volume, const core::DynamicArray }; typedef core::Map> PosMap; - PosMap posMap((int)subdivided.size()); + PosMap posMap((int)subdivided.size() * 3); for (const Tri &tri : subdivided) { const glm::vec2 &uv = tri.centerUV(); const core::RGBA rgba = tri.colorAt(uv);