Fixed bug with assert failure when JSON dump is created while a custom pool exist with specified string name
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 @@
                             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 @@
         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);
     }