fixed possible access violation in HSV2RGB (patch #2020)

pull/31/head
Vadim Pisarevsky 13 years ago
parent bbeffcc115
commit 9ea5b6bb44
  1. 5
      modules/imgproc/src/color.cpp

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

Loading…
Cancel
Save