From f0c7195a04828171d1e5fe9e051da04fa03c6a86 Mon Sep 17 00:00:00 2001 From: Rene Brun <Rene.Brun@cern.ch> Date: Fri, 13 Feb 2004 20:12:44 +0000 Subject: [PATCH] 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 --- pythia6/src/TPythia6.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pythia6/src/TPythia6.cxx b/pythia6/src/TPythia6.cxx index 2f95f5c77bf..e83df3543c4 100644 --- a/pythia6/src/TPythia6.cxx +++ b/pythia6/src/TPythia6.cxx @@ -1,4 +1,4 @@ -// @(#)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) { -- GitLab