From 44a5aea4ef4225a07fb6392889d9982e8249af8f Mon Sep 17 00:00:00 2001 From: Sidney Just Date: Thu, 3 Mar 2022 17:04:20 -0800 Subject: [PATCH] Fixed loop termination when ending defragment passes --- include/vk_mem_alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 35e0ae6..009d15f 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -13276,7 +13276,7 @@ VkResult VmaDefragmentationContext_T::DefragmentPassEnd(VmaDefragmentationPassMo for (const FragmentedBlock& block : immovableBlocks) { VmaBlockVector* vector = m_pBlockVectors[block.data]; - for (size_t i = m_ImmovableBlockCount; vector->GetBlockCount(); ++i) + for (size_t i = m_ImmovableBlockCount; i < vector->GetBlockCount(); ++i) { if (vector->GetBlock(i) == block.block) {