kernel32: Restore check for StandardDate.wMonth being 0.

This commit is contained in:
Dmitry Timoshkov 2007-08-21 21:44:50 +09:00 committed by Alexandre Julliard
parent e98d1da7d4
commit 18060ed7d4
1 changed files with 3 additions and 2 deletions

View File

@ -166,11 +166,12 @@ static DWORD TIME_CompTimeZoneID ( const TIME_ZONE_INFORMATION *pTZinfo,
/* if year is 0 then date is in day-of-week format, otherwise /* if year is 0 then date is in day-of-week format, otherwise
* it's absolute date. * it's absolute date.
*/ */
if (pTZinfo->StandardDate.wYear == 0 && if (pTZinfo->StandardDate.wMonth == 0 ||
(pTZinfo->StandardDate.wYear == 0 &&
(pTZinfo->StandardDate.wDay<1 || (pTZinfo->StandardDate.wDay<1 ||
pTZinfo->StandardDate.wDay>5 || pTZinfo->StandardDate.wDay>5 ||
pTZinfo->DaylightDate.wDay<1 || pTZinfo->DaylightDate.wDay<1 ||
pTZinfo->DaylightDate.wDay>5)) pTZinfo->DaylightDate.wDay>5)))
{ {
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return TIME_ZONE_ID_INVALID; return TIME_ZONE_ID_INVALID;