Skip to content

Commit

Permalink
fixed "Conditional jump or move depends on uninitialised value(s)" in…
Browse files Browse the repository at this point in the history
… GBD
  • Loading branch information
ilya-lavrenov authored and Dikay900 committed Sep 13, 2015
1 parent 1d77d69 commit ee2008a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ml/src/gbt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ CvGBTrees::train( const CvMat* _train_data, int _tflag,
for (int i=1; i<n; ++i)
{
int k = 0;
while ((int(orig_response->data.fl[i]) - class_labels->data.i[k]) && (k<j))
while ((k<j) && (int(orig_response->data.fl[i]) - class_labels->data.i[k]))
k++;
if (k == j)
{
Expand Down

0 comments on commit ee2008a

Please sign in to comment.