mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01:00
fixed potential infinite loop
This commit is contained in:
parent
8f8072880e
commit
461de57265
@ -96,12 +96,15 @@ void GridLayout::minimize()
|
||||
if (vec.empty())
|
||||
return;
|
||||
const std::size_t pos = vec.size() - 1;
|
||||
std::size_t i = pos;
|
||||
for (; i >= 0; --i)
|
||||
std::size_t i = vec.size();
|
||||
|
||||
do
|
||||
{
|
||||
--i;
|
||||
if (vec[i])
|
||||
break;
|
||||
}
|
||||
while (i > 0);
|
||||
if (i < pos)
|
||||
{
|
||||
// pos to cnt
|
||||
|
Loading…
Reference in New Issue
Block a user