Commit 7a7b0bcf authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

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

parent 0d706f67
......@@ -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);
......
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