Ticket #135: strcpy_random_1.patch
File strcpy_random_1.patch, 1.1 KB (added by , 14 years ago) |
---|
-
ATOOLS/Math/Random.C
240 240 // Check if the first 20 bytes in file are a known identifier and 241 241 // set the activeGenerator variable accordingly 242 242 file.read(status.idTag, 16); 243 if (strcmp(status.idTag,"Rnd4_G _Marsaglia"))243 if (strcmp(status.idTag,"Rnd4_GMarsaglia")) 244 244 { activeGenerator = 2; } else { activeGenerator = 4; } 245 245 file.close(); 246 246 … … 384 384 { 385 385 // mark Generator 4 as used one and set idTag for file output 386 386 activeGenerator = 4; 387 strcpy(status.idTag, "Rnd4_G _Marsaglia");387 strcpy(status.idTag, "Rnd4_GMarsaglia"); 388 388 389 389 // Init routine of the Random Generator Rnd4 390 390 double s,t; … … 475 475 476 476 char temp[16]; 477 477 strncpy(temp,status.idTag,16); 478 if (strcmp(temp, "Rnd4_G _Marsaglia")) {478 if (strcmp(temp, "Rnd4_GMarsaglia")) { 479 479 // Data read in was not from a RndGen of the same type 480 480 msg_Error()<<"WARNING in Random::ReadInStatus4: Data read from " 481 481 <<filename<<" is not of the expected type."<<endl;