From c1bd30eb7f21216bd156ac97ceb692776b2af47d Mon Sep 17 00:00:00 2001 From: Gliniak Date: Fri, 4 Aug 2023 21:50:30 +0200 Subject: [PATCH] Fixed invalid month decoding in decode_fat_timestamp --- src/xenia/vfs/devices/stfs_xbox.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/vfs/devices/stfs_xbox.h b/src/xenia/vfs/devices/stfs_xbox.h index 39c0664ce..3e2df4f35 100644 --- a/src/xenia/vfs/devices/stfs_xbox.h +++ b/src/xenia/vfs/devices/stfs_xbox.h @@ -22,7 +22,7 @@ inline uint64_t decode_fat_timestamp(const uint32_t date, const uint32_t time) { struct tm tm = {0}; // 80 is the difference between 1980 (FAT) and 1900 (tm); tm.tm_year = ((0xFE00 & date) >> 9) + 80; - tm.tm_mon = ((0x01E0 & date) >> 5); + tm.tm_mon = ((0x01E0 & date) >> 5) - 1; tm.tm_mday = (0x001F & date) >> 0; tm.tm_hour = (0xF800 & time) >> 11; tm.tm_min = (0x07E0 & time) >> 5;