From c02642843c7d5bf07909fca72f63c394a28118db Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Thu, 17 Dec 2020 01:43:39 -0700 Subject: [PATCH] Fix crash due to vector initialization using wrong constructor Because VkImageView is a uint64_t, not a strong type, the constructor thinks the .size() is a value to initialize with, not a size. --- src/VkBootstrap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index 2a68754..8ca3a88 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -1660,7 +1660,7 @@ detail::Result> Swapchain::get_image_views () { if (!swapchain_images_ret) return swapchain_images_ret.error (); auto swapchain_images = swapchain_images_ret.value (); - std::vector views{ swapchain_images.size () }; + std::vector views (swapchain_images.size ()); for (size_t i = 0; i < swapchain_images.size (); i++) { VkImageViewCreateInfo createInfo = {};