Commit ae608e6e authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

comctl32: Validate the day of month when scrolling through years.

parent 0d8775c9
......@@ -474,6 +474,9 @@ DATETIME_IncreaseField (DATETIME_INFO *infoPtr, int number, int delta)
case TWODIGITYEAR:
case FULLYEAR:
date->wYear = wrap(date->wYear, delta, 1752, 9999);
if (date->wDay > MONTHCAL_MonthLength(date->wMonth, date->wYear))
/* This can happen when moving away from a leap year. */
date->wDay = MONTHCAL_MonthLength(date->wMonth, date->wYear);
MONTHCAL_CalculateDayOfWeek(date, TRUE);
break;
case ONEDIGITMONTH:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment