From 482688f3669677079536583190d766e31f54d2cf Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Fri, 17 Nov 2023 00:03:38 +0100 Subject: [PATCH] Use proper level for grid size. (#4246) Close #4230 --- io/private/copcwriter/Grid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/private/copcwriter/Grid.cpp b/io/private/copcwriter/Grid.cpp index cd35af6428..93a27a3bf9 100644 --- a/io/private/copcwriter/Grid.cpp +++ b/io/private/copcwriter/Grid.cpp @@ -96,7 +96,7 @@ void Grid::resetLevel(int level) { // We have to have at least level 1 or things break when sampling. m_maxLevel = (std::max)(level, 1); - m_gridSize = (int)std::pow(2, level); + m_gridSize = (int)std::pow(2, m_maxLevel); if (m_cubic) {