From: dsarrut Date: Tue, 5 Oct 2010 09:30:11 +0000 (+0000) Subject: correct bug (copy message) X-Git-Tag: v1.2.0~362 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0ce3ba4762f60cb451490224e436081cb0ae2598;p=clitk.git correct bug (copy message) --- diff --git a/common/clitkExceptionObject.cxx b/common/clitkExceptionObject.cxx index 8adb8a0..b76edf5 100644 --- a/common/clitkExceptionObject.cxx +++ b/common/clitkExceptionObject.cxx @@ -37,7 +37,10 @@ const char* clitk::ExceptionObject::what() const throw() ::itk::OStringStream message; message << "clitk::ERROR in " << m_Filename << " line " << m_LineNumber << " : " << std::endl << "\t" << m_Message; - return message.str().c_str(); + 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(); } //--------------------------------------------------------------------