Skip to content

Commit

Permalink
fix edge case with 1 path fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGuarracino committed Aug 20, 2023
1 parent eae76d3 commit 32af616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ int main(int argc, char **argv) {
prec_i = i;
}
}
if (prec_i != path_mapping.size() - 1) {
if (path_mapping.size() == 1 || prec_i != path_mapping.size() - 1) {
smoothed->create_path_handle(path_handle_2_name_and_length[prec_path].first);
path_handle_2_start_and_end_in_path_mapping[prec_path] = std::make_pair(prec_i, path_mapping.size() - 1);
}
Expand Down

0 comments on commit 32af616

Please sign in to comment.