Fix infinite loop
This commit is contained in:
parent
fa6d026edc
commit
982d28cace
|
|
@ -27,10 +27,12 @@ namespace Nz
|
|||
std::size_t poolCount = m_descriptorPools.size();
|
||||
if (poolCount >= 2 && m_descriptorPools.back().freeBindings.TestAll())
|
||||
{
|
||||
for (std::size_t i = poolCount - 1; i > 0; ++i)
|
||||
for (std::size_t i = poolCount - 1; i > 0; --i)
|
||||
{
|
||||
if (m_descriptorPools[i].freeBindings.TestAll())
|
||||
poolCount--;
|
||||
if (!m_descriptorPools[i].freeBindings.TestAll())
|
||||
break;
|
||||
|
||||
poolCount--;
|
||||
}
|
||||
|
||||
m_descriptorPools.resize(poolCount);
|
||||
|
|
|
|||
|
|
@ -27,10 +27,12 @@ namespace Nz
|
|||
std::size_t poolCount = m_descriptorPools.size();
|
||||
if (poolCount >= 2 && m_descriptorPools.back().freeBindings.TestAll())
|
||||
{
|
||||
for (std::size_t i = poolCount - 1; i > 0; ++i)
|
||||
for (std::size_t i = poolCount - 1; i > 0; --i)
|
||||
{
|
||||
if (m_descriptorPools[i].freeBindings.TestAll())
|
||||
poolCount--;
|
||||
if (!m_descriptorPools[i].freeBindings.TestAll())
|
||||
break;
|
||||
|
||||
poolCount--;
|
||||
}
|
||||
|
||||
m_descriptorPools.resize(poolCount);
|
||||
|
|
|
|||
Loading…
Reference in New Issue