Skip to content

Commit

Permalink
fixed the upper boundary when calling checkRange (thanks to alalek)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpisarev committed Dec 10, 2015
1 parent 0d706f6 commit 7a7b0bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ml/src/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class TrainDataImpl : public TrainData
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);
Expand Down

0 comments on commit 7a7b0bc

Please sign in to comment.