Fix out-of-bound bug pointed out by Ryan McFadden.

This commit is contained in:
suter_a 2021-04-13 07:33:14 +02:00
parent 3fc410e7a7
commit b3cd31199e

View File

@ -7039,10 +7039,12 @@ void PMsrHandler::MakeDetectorGroupingString(TString str, PIntVector &group, TSt
UInt_t i=0, j=0; UInt_t i=0, j=0;
do { do {
j = i; j = i;
while (group[j]+1 == group[j+1]) { if (j+1 < group.size()) {
j++; while (group[j]+1 == group[j+1]) {
if (j == group.size()-1) j++;
break; if (j == group.size()-1)
break;
}
} }
if (j >= i+2) { if (j >= i+2) {