summaryrefslogtreecommitdiff
path: root/firmware/usbstack
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@yahoo.ca>2013-05-17 21:12:56 +0200
committerBertrik Sikken <bertrik@sikken.nl>2013-05-17 21:12:56 +0200
commit01d0de9fc41ac0be8738f9a105f85b0b1ff66de7 (patch)
tree18608360bf334008ee3fd2b755a96d9ab75f4719 /firmware/usbstack
parenta7dee7f4472d9ebc77d6917043dc3c59a38e40d5 (diff)
FS#12854 - ipod-time-sync sets wrong day
Change-Id: I8ac7561119e51774b9aee377e7373a7e830a5780
Diffstat (limited to 'firmware/usbstack')
-rw-r--r--firmware/usbstack/usb_storage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index b7fdeac7e2..5a1970fd1d 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -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++)