return empty string instead of some garbage if strftime() failed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -487,8 +487,10 @@ static wxString CallStrftime(const wxString& format, const tm* tm)
|
||||
|
||||
if ( !wxStrftime(buf, WXSIZEOF(buf), format, tm) )
|
||||
{
|
||||
// buffer is too small?
|
||||
// if the format is valid, buffer must be too small?
|
||||
wxFAIL_MSG(_T("strftime() failed"));
|
||||
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
s = buf;
|
||||
|
Reference in New Issue
Block a user