Skip to content

Commit cc8a313

Browse files
committed
fixed segfault in ML with RF probability
1 parent 2998918 commit cc8a313

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/higher-level/ml-hl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ bool valid;
284284

285285
mean = mean_old = var = 0;
286286
ntree = 0;
287-
memset(mean_prob, 0, phl->mcl.nclass_all_sets*sizeof(double));
287+
if (rfprob) memset(mean_prob, 0, phl->mcl.nclass_all_sets*sizeof(double));
288288

289289
for (m=0; m<phl->mcl.nmodel[s]; m++, k++){
290290

0 commit comments

Comments
 (0)