Fix out-of-bound bug pointed out by Ryan McFadden.
This commit is contained in:
parent
3fc410e7a7
commit
b3cd31199e
@ -7039,11 +7039,13 @@ 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;
|
||||||
|
if (j+1 < group.size()) {
|
||||||
while (group[j]+1 == group[j+1]) {
|
while (group[j]+1 == group[j+1]) {
|
||||||
j++;
|
j++;
|
||||||
if (j == group.size()-1)
|
if (j == group.size()-1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (j >= i+2) {
|
if (j >= i+2) {
|
||||||
result += group[i];
|
result += group[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user