fixed "Conditional jump or move depends on uninitialised value(s)" in GBD

pull/5285/head
Ilya Lavrenov 10 years ago
parent 94cf5430d0
commit 887736bcd4
  1. 2
      modules/ml/src/gbt.cpp

@ -259,7 +259,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)
{

Loading…
Cancel
Save