another buglet in ParseDate() fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3021,7 +3021,6 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
||||
wxStringTokenizer tok(p, dateDelimiters);
|
||||
while ( tok.HasMoreTokens() )
|
||||
{
|
||||
nPosCur = tok.GetPosition();
|
||||
wxString token = tok.GetNextToken();
|
||||
|
||||
// is it a number?
|
||||
@@ -3140,8 +3139,9 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
||||
}
|
||||
else // not a number
|
||||
{
|
||||
mon = GetMonthFromName(token, Name_Full | Name_Abbr);
|
||||
if ( mon != Inv_Month )
|
||||
// be careful not to overwrite the current mon value
|
||||
Month mon2 = GetMonthFromName(token, Name_Full | Name_Abbr);
|
||||
if ( mon2 != Inv_Month )
|
||||
{
|
||||
// it's a month
|
||||
if ( haveMon )
|
||||
@@ -3149,6 +3149,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
||||
break;
|
||||
}
|
||||
|
||||
mon = mon2;
|
||||
|
||||
haveMon = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3223,6 +3225,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nPosCur = tok.GetPosition();
|
||||
}
|
||||
|
||||
// either no more tokens or the scan was stopped by something we couldn't
|
||||
|
Reference in New Issue
Block a user