Fix infinite loop in wxDateTime::Format() when fields width was used.

Just add a missing increment of the loop variable.

See #12451.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2010-09-09 22:20:12 +00:00
parent ca9fc039c1
commit da209561e3

View File

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