Skip to content

Commit 0881c5b

Browse files
authored
Merge pull request #45581 from omiguelc/emtfp2_loop_fix_for_14_1_0_pre6
hotfix for array out of bounds
2 parents 21de154 + aede79d commit 0881c5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

L1Trigger/L1TMuonEndCapPhase2/src/Algo/RoadSortingLayer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void RoadSortingLayer::apply(const unsigned int& first_n,
9797
roads_kept, 32, 16, [](const road_t& lhs, const road_t& rhs) -> int { return lhs.quality < rhs.quality; });
9898

9999
// Shift everything 16 cols to the left
100-
for (unsigned int i = 16; i < keep_n_roads; ++i) {
100+
for (unsigned int i = 16; i < (keep_n_roads - 16); ++i) {
101101
roads_kept[i] = roads_kept[i + 16];
102102
}
103103

0 commit comments

Comments
 (0)