X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba75967c9c0656ec0bcc342878cd9cdd27857ea9..0d65f8d20fee39040d05dd546a1d4a935990acd3:/src/common/datetimefmt.cpp diff --git a/src/common/datetimefmt.cpp b/src/common/datetimefmt.cpp index 7095fde856..64bb825190 100644 --- a/src/common/datetimefmt.cpp +++ b/src/common/datetimefmt.cpp @@ -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; }