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.
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index a11a214..eb6acd1 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -6789,7 +6789,7 @@
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;
}