summaryrefslogtreecommitdiffstats
path: root/firmware/usbstack
diff options
context:
space:
mode:
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++)