fixed the upper boundary when calling checkRange (thanks to alalek)

This commit is contained in:
Vadim Pisarevsky 2015-12-10 20:17:17 +03:00
parent 0d706f6796
commit 7a7b0bcfcb

View File

@ -253,7 +253,7 @@ public:
if( !sampleIdx.empty() )
{
CV_Assert( (sampleIdx.checkVector(1, CV_32S, true) > 0 &&
checkRange(sampleIdx, true, 0, 0, nsamples-1)) ||
checkRange(sampleIdx, true, 0, 0, nsamples)) ||
sampleIdx.checkVector(1, CV_8U, true) == nsamples );
if( sampleIdx.type() == CV_8U )
sampleIdx = convertMaskToIdx(sampleIdx);