Skip to content
Snippets Groups Projects
Commit f0c7195a authored by Rene Brun's avatar Rene Brun
Browse files

Protect TPythia6::PyName making sure that the returned string is terminated by a 0 character.

git-svn-id: http://root.cern.ch/svn/root/trunk@8205 27541ba8-7e3a-0410-8455-c3a389f83636
parent 952c6cc1
No related branches found
No related tags found
No related merge requests found
// @(#)root/pythia6:$Name: $:$Id: TPythia6.cxx,v 1.11 2004/02/11 13:23:30 brun Exp $
// @(#)root/pythia6:$Name: $:$Id: TPythia6.cxx,v 1.12 2004/02/12 13:46:53 brun Exp $
// Author: Rene Brun 19/10/99
//
////////////////////////////////////////////////////////////////////////////////
......@@ -508,10 +508,10 @@ void TPythia6::Pyname(int kf, char* name) {
pyname(&kf,name,15);
// cut trailing blanks to get C string
for (int i=15; (i>=0) && (name[i] != ' '); i--) {
name[i] = 0;
}
name[15] = 0;
//for (int i=15; (i>=0) && (name[i] == ' '); i--) {
// name[i] = 0;
// }
}
double TPythia6::Pyr(int idummy) {
......
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