Correcting usage of string arrays (valgrind)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Jan 2003 08:10:13 +0000 (08:10 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Jan 2003 08:10:13 +0000 (08:10 +0000)
ITS/AliITSvPPRasymm.cxx

index 084c83c..66a2ed8 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.61  2002/11/21 23:05:27  alibrary
+Removing AliMC and AliMCProcess
+
 Revision 1.60  2002/10/22 14:45:47  alibrary
 Introducing Riostream.h
 
@@ -29068,7 +29071,7 @@ void AliITSvPPRasymm::InitAliITSgeom(){
     Int_t    npar,natt,idshape,imat,imed;
     AliITSGeant3Geometry *ig = new AliITSGeant3Geometry();
     Int_t mod,lay,lad,det,i,j,k;
-    Char_t names[nlayers][ndeep][4];
+    Char_t names[nlayers][ndeep][5];
     Int_t itsGeomTreeCopys[nlayers][ndeep];
     if(fMinorVersion == 1){ // Option A
     Char_t *namesA[nlayers][ndeep] = {
@@ -29085,7 +29088,8 @@ void AliITSvPPRasymm::InitAliITSgeom(){
                                              {1,1,1,1,34,22, 1,0,0},// lay=5
                                              {1,1,1,1,38,25, 1,0,0}};//lay=6
     for(i=0;i<nlayers;i++)for(j=0;j<ndeep;j++){
-       for(k=0;k<4;k++) names[i][j][k] = namesA[i][j][k];
+      //PH     for(k=0;k<4;k++) names[i][j][k] = namesA[i][j][k];
+       strcpy(names[i][j], namesA[i][j]);
        itsGeomTreeCopys[i][j] = itsGeomTreeCopysA[i][j];
     } // end for i,j
     }else if(fMinorVersion == 2){ // Option B
@@ -29103,7 +29107,8 @@ void AliITSvPPRasymm::InitAliITSgeom(){
                                              {1,1,1,1,34,22, 1,0,0},// lay=5
                                              {1,1,1,1,38,25, 1,0,0}};//lay=6
     for(i=0;i<nlayers;i++)for(j=0;j<ndeep;j++){
-       for(k=0;k<4;k++) names[i][j][k] = namesB[i][j][k];
+      //PH     for(k=0;k<4;k++) names[i][j][k] = namesB[i][j][k];
+       strcpy(names[i][j], namesB[i][j]);
        itsGeomTreeCopys[i][j] = itsGeomTreeCopysB[i][j];
     } // end for i,j
     } // end if fMinorVersion