From 99841eedeea3117b5d432f52cf920a3b5d0c8ba5 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 26 Jun 2016 11:11:36 +0100 Subject: [PATCH] Corrected code for generating the month view grid in leap years. --- source/common/monthviewgen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/common/monthviewgen.cpp b/source/common/monthviewgen.cpp index f1bd702..f267b84 100644 --- a/source/common/monthviewgen.cpp +++ b/source/common/monthviewgen.cpp @@ -221,13 +221,13 @@ XCCalendarMonthViewGrid GenerateMonthGrid(int Month, int Year){ } - if (Month == 2 && ProcessDay == 28){ - + if (Month == 2 && ProcessDay == 29){ + break; } - } else if (Month == 2 && ProcessDay == 28){ + } else if ((Month == 2 && ProcessDay == 28) && Year % 4 != 0){ break; -- 2.39.5