Skip to content

Commit

Permalink
Fix segfault (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Mar 7, 2023
1 parent cd50192 commit 2ccbc76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions randomforest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ void classify(PointSet &pointSet,
}

std::size_t correct = 0;
if (!pointSet.hasLabels()) pointSet.labels.resize(pointSet.count());

#pragma omp parallel for
for (size_t i = 0; i < pointSet.count(); i++){
Expand Down

0 comments on commit 2ccbc76

Please sign in to comment.