X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77fa3d8243a5118b3edcccfeb18279b7e04aa51d..c3485a4eef3a3fb03f8a12784d6b35bb68471ea0:/src/common/datetime.cpp?ds=sidebyside diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 7fdd2affd1..8bd4933a18 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -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; @@ -2847,8 +2849,9 @@ wxDateTime::ParseRfc822Date(const wxString& date, wxString::const_iterator *end) min = (wxDateTime_t)(min + *p++ - _T('0')); wxDateTime_t sec = 0; - if ( *p++ == _T(':') ) + if ( *p == _T(':') ) { + p++; if ( !wxIsdigit(*p) ) { return NULL;