Backport r65496: Fix infinite loop in wxDateTime::Format() when fields width was used. Closes #12451

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@65724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Tim Kosse
2010-10-02 12:57:57 +00:00
parent db7213c07f
commit 31750f130d

View File

@@ -2664,9 +2664,10 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
default: default:
// is it the format width? // is it the format width?
fmt.Empty(); for( fmt.clear();
while ( *p == _T('-') || *p == _T('+') || *p == _T('-') || *p == _T('+') ||
*p == _T(' ') || wxIsdigit(*p) ) *p == _T(' ') || wxIsdigit(*p);
++p )
{ {
fmt += *p; fmt += *p;
} }