[rtl]
authorAleksey Bragin <aleksey@reactos.org>
Fri, 23 Oct 2009 13:19:36 +0000 (13:19 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Fri, 23 Oct 2009 13:19:36 +0000 (13:19 +0000)
- Fix incorrect leap year days checking condition, spotted by Gabriel Iliardi.
See issue #4917 for more details.

svn path=/trunk/; revision=43698

reactos/lib/rtl/time.c

index 130da93..1ae111b 100644 (file)
@@ -192,8 +192,8 @@ RtlTimeFieldsToTime(
        TimeFields->Hour < 0 || TimeFields->Hour > 23 ||
        TimeFields->Month < 1 || TimeFields->Month > 12 ||
        TimeFields->Day < 1 ||
-       TimeFields->Day > MonthLengths[TimeFields->Month == 2 ||
-       IsLeapYear(TimeFields->Year)][TimeFields->Month - 1] ||
+       TimeFields->Day >
+           MonthLengths[IsLeapYear(TimeFields->Year)][TimeFields->Month - 1] ||
        TimeFields->Year < 1601)
    {
        return FALSE;