From db97ac84d8271b39696a1bb254f7c5c4db578dfa Mon Sep 17 00:00:00 2001 From: dsarrut Date: Tue, 15 Feb 2011 10:40:15 +0000 Subject: [PATCH] correct bug in string copy --- common/clitkExceptionObject.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/clitkExceptionObject.cxx b/common/clitkExceptionObject.cxx index cadc7b8..2b25696 100644 --- a/common/clitkExceptionObject.cxx +++ b/common/clitkExceptionObject.cxx @@ -38,9 +38,8 @@ const char* clitk::ExceptionObject::what() const throw() message << "clitk::ERROR in " << m_Filename << " line " << m_LineNumber << " : " << std::endl << "\t" << m_Message; char * m = new char[message.str().length()]; - for(uint i=0; i< message.str().length(); i++) - m[i] = message.str().c_str()[i]; - return m;//essage.str().c_str(); + strcpy(m, message.str().c_str()); + return m; } //-------------------------------------------------------------------- -- 2.47.1