Skip to content

Commit

Permalink
Merge pull request #34757 from iarspider/patch-3
Browse files Browse the repository at this point in the history
[GCC 11] Fix error "array subscript outside array bounds"
  • Loading branch information
cmsbuild authored Aug 10, 2021
2 parents 885ca5c + e9a5cb6 commit 927d78d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace {

float xmi[3] = {0.0, 0.24, 0.76};
float xma[3] = {0.24, 0.76, 1.00};
TPad** pad = new TPad*;
TPad** pad = new TPad*[3];
for (int obj = 0; obj < 3; obj++) {
pad[obj] = new TPad(Form("p_%i", obj), Form("p_%i", obj), xmi[obj], 0.0, xma[obj], 0.94);
pad[obj]->Draw();
Expand Down Expand Up @@ -262,7 +262,7 @@ namespace {
}
float xmi[3] = {0.0, 0.24, 0.76};
float xma[3] = {0.24, 0.76, 1.00};
TPad** pad = new TPad*;
TPad** pad = new TPad*[3];
for (int obj = 0; obj < 3; obj++) {
pad[obj] = new TPad(Form("p_%i", obj), Form("p_%i", obj), xmi[obj], 0.0, xma[obj], 0.94);
pad[obj]->Draw();
Expand Down

0 comments on commit 927d78d

Please sign in to comment.