Skip to content

Commit dd1562c

Browse files
authored
Fix undefined behavior in base_score (#646)
1 parent 43c71e6 commit dd1562c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model_loader/detail/xgboost.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ std::vector<float> ParseBaseScore(std::string const& str) {
7373
}
7474
} else {
7575
// Scalar base_score (from XGBoost <3.1)
76-
parsed_base_score = {std::stof(str)};
76+
parsed_base_score = std::vector<float>{std::stof(str)};
7777
}
7878
return parsed_base_score;
7979
}

0 commit comments

Comments
 (0)