diff --git a/hist/hist/src/TProfile.cxx b/hist/hist/src/TProfile.cxx index 61c1375dfc0856002dac77cca26c82852aa00128..b908c1ad858d249d1e08407e64e5cdb31f852cf0 100644 --- a/hist/hist/src/TProfile.cxx +++ b/hist/hist/src/TProfile.cxx @@ -1565,7 +1565,7 @@ TH1 *TProfile::Rebin(Int_t ngroup, const char*newname, const Double_t *xbins) if(!xbins && (fXaxis.GetXbins()->GetSize() > 0)){ // variable bin sizes Double_t *bins = new Double_t[newbins+1]; - for(Int_t i = 0; i <= newbins; ++i) bins[i] = fXaxis.GetBinLowEdge(1+i*ngroup); + for(i = 0; i <= newbins; ++i) bins[i] = fXaxis.GetBinLowEdge(1+i*ngroup); hnew->SetBins(newbins,bins); //this also changes errors array (if any) delete [] bins; } else if (xbins) {