Commit 9ea5b6bb authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed possible access violation in HSV2RGB (patch #2020)

parent bbeffcc1
......@@ -934,6 +934,11 @@ struct HSV2RGB_f
do h -= 6; while( h >= 6 );
sector = cvFloor(h);
h -= sector;
if( (unsigned)sector >= 6u )
{
sector = 0;
h = 0.f;
}
tab[0] = v;
tab[1] = v*(1.f - s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment