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:
Vadim Zeitlin
2008-08-03 14:34:43 +00:00
parent 45ca0e7750
commit adec277f04

View File

@@ -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;