Skip to content

Commit 28c85c0

Browse files
committed
Fix another EMCAL out of bounds error
1 parent b763b94 commit 28c85c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Detectors/EMCAL/reconstruction/src/AltroDecoder.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void AltroDecoder::readChannels()
8181

8282
// decode bunches
8383
int currentsample = 0;
84-
while (currentsample < currentchannel.getPayloadSize() && bunchwords.size() > currentsample) {
84+
while (currentsample < currentchannel.getPayloadSize() && bunchwords.size() > currentsample + 2) {
8585
int bunchlength = bunchwords[currentsample] - 2, // remove words for bunchlength and starttime
8686
starttime = bunchwords[currentsample + 1];
8787
auto& currentbunch = currentchannel.createBunch(bunchlength, starttime);

0 commit comments

Comments
 (0)