diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index c2d5d46..256b654 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -16006,8 +16006,8 @@ void VmaAllocator_T::PrintDetailedMap(VmaJsonWriter& json) json.ContinueString_Size(index++); if (pool->GetName()) { - json.WriteString(" - "); - json.WriteString(pool->GetName()); + json.ContinueString(" - "); + json.ContinueString(pool->GetName()); } json.EndString(); diff --git a/src/Tests.cpp b/src/Tests.cpp index baee5c4..5c90ef0 100644 --- a/src/Tests.cpp +++ b/src/Tests.cpp @@ -5175,6 +5175,11 @@ static void TestPool_SameSize() vmaGetPoolName(g_hAllocator, pool, &fetchedPoolName); TEST(strcmp(fetchedPoolName, POOL_NAME) == 0); + // Generate JSON dump. There was a bug with this... + char* json = nullptr; + vmaBuildStatsString(g_hAllocator, &json, VK_TRUE); + vmaFreeStatsString(g_hAllocator, json); + vmaSetPoolName(g_hAllocator, pool, nullptr); }