fixed possible access violation in HSV2RGB (patch #2020)

This commit is contained in:
Vadim Pisarevsky 2012-09-11 14:25:34 +04:00
parent bbeffcc115
commit 9ea5b6bb44

View File

@ -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);