Colors for many histograms in THStack wrong

Dear all,

when plotting a THStack with many 2D histograms (~30 or so) and setting the color for each histogram with h->SetFillColor(40); to a single color, the first 8 histos look ok, however, the histos 9 to the end do have completely different colors!

The code is below, it does not work for many recent versions, including the HEAD in cvs.

cheers, Rolf

{
TH2D *hist[30];
THStack *a = new THStack(“a”,“LegoPlot”);

for(Int_t ihist=0; ihist<20; ihist++ ) {
TString hn=“hist_”; hn+=ihist;
hist[ihist] = new TH2D(hn,hn,50,0,50,50,0,50);
hist[ihist]->SetBinContent(2*ihist+1,1,double(ihist));
hist[ihist]->SetFillColor(40);
a->Add(hist[ihist]);
}
a->Draw();
}

Color indeces were hold in fixed size arrays (size 10). This is now fixed in my own version of root and will be soon fixed in the cvs head too when René will commit my patch. I let you know.

the fix is now in the cvs head