Skip to content
Snippets Groups Projects
Commit 38b66f88 authored by Philippe Canal's avatar Philippe Canal
Browse files

Import revision 49242 from the v5-34-00 patch branch:

Avoid uninitalized memory read (SetCharge checks the value of fQ)


git-svn-id: http://root.cern.ch/svn/root/trunk@49243 27541ba8-7e3a-0410-8455-c3a389f83636
parent 710f3347
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,7 @@ TGeoHelix::TGeoHelix(Double_t curvature, Double_t hstep, Int_t charge)
// Normal constructor
SetXYcurvature(curvature);
SetHelixStep(hstep);
fQ = 0;
SetCharge(charge);
fStep = 0.;
fPhi = 0.;
......@@ -80,7 +81,6 @@ TGeoHelix::TGeoHelix(Double_t curvature, Double_t hstep, Int_t charge)
fPoint[0] = fPoint[1] = fPoint[2] = 0.;
fDir[0] = fDir[1] = fDir[2] = 0.;
fB[0] = fB[1] = fB[2] = 0.;
fQ = 0;
fMatrix = new TGeoHMatrix();
TObject::SetBit(kHelixNeedUpdate, kTRUE);
TObject::SetBit(kHelixStraigth, kFALSE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment