FS#12854 - ipod-time-sync sets wrong day

Change-Id: I8ac7561119e51774b9aee377e7373a7e830a5780
This commit is contained in:
Boris Gjenero 2013-05-17 21:12:56 +02:00 committed by Bertrik Sikken
parent a7dee7f447
commit 01d0de9fc4

View file

@ -336,7 +336,7 @@ static void yearday_to_daymonth(int yd, int y, int *d, int *m)
static char t[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
bool leap = (y%4 == 0 && y%100 != 0) || y%400 == 0;
t[2] = leap ? 29 : 28;
t[1] = leap ? 29 : 28;
int i;
for (i = 0; i < 12 && yd >= t[i]; i++)