Skip to content
Snippets Groups Projects
Commit 21592bc6 authored by Patrick Imbo's avatar Patrick Imbo
Browse files

BUG: dangerous while condition

parent 43ee314c
Branches
Tags
No related merge requests found
......@@ -162,8 +162,10 @@ public:
unsigned int i = 0;
std::vector<unsigned int> rgb(3);
unsigned int min;
min = std::min(this->GetNumberOfBands(), static_cast<unsigned int>(3));
while( i <this->GetNumberOfBands() || i < 3 )
while( i < min )
{
rgb[i] = i;
++i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment