Skip to content

Commit

Permalink
fix(segfault): Fix segfault bug in get_linear_summary (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonywu1999 authored Jan 9, 2025
1 parent 88489fe commit a1760a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/linear_summary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ NumericVector get_feature_run(NumericVector find_runs, NumericVector find_featur
NumericVector find_run_feature = intersect(find_runs, find_features);
int n_rows = counts.nrow();
NumericVector rf(0);
if ((find_run_feature.length() != 0) & !(find_run_feature[0] == -1)) {
if ((find_run_feature.length() != 0) && !(find_run_feature[0] == -1)) {
CharacterVector temp_rf = coef_names[find_run_feature];
rf = rep(1 / n_rows, temp_rf.length());
rf.attr("names") = temp_rf;
Expand Down

0 comments on commit a1760a1

Please sign in to comment.