From 45e8713f5cebc2634f6f1aa6ec555eec054c5fea Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Fri, 25 Mar 2016 13:21:25 -0600 Subject: layers: Use vector::resize instead of reserve to avoid portability issue. Fixes layer crash on Windows with cube --validate. On Windows, std::vector won't bump up the size of a vector (up to the reserved amount) on an out_of_range access, while linux will. --- layers/core_validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index a11a214b..eb6acd14 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -6789,7 +6789,7 @@ vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAl pNewNode->set = pDescriptorSets[i]; pNewNode->descriptorCount = (pLayout->createInfo.bindingCount != 0) ? pLayout->endIndex + 1 : 0; if (pNewNode->descriptorCount) { - pNewNode->pDescriptorUpdates.reserve(pNewNode->descriptorCount); + pNewNode->pDescriptorUpdates.resize(pNewNode->descriptorCount); } dev_data->setMap[pDescriptorSets[i]] = pNewNode; } -- cgit v1.2.3