Commit d50c07e3 authored by Ilya Lavrenov's avatar Ilya Lavrenov Committed by Alexander Smorkalov

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

(cherry picked from commit 887736bc)
parent 54693b3f
...@@ -259,7 +259,7 @@ CvGBTrees::train( const CvMat* _train_data, int _tflag, ...@@ -259,7 +259,7 @@ CvGBTrees::train( const CvMat* _train_data, int _tflag,
for (int i=1; i<n; ++i) for (int i=1; i<n; ++i)
{ {
int k = 0; 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++; k++;
if (k == j) if (k == j)
{ {
......
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