Skip to content

Commit f6b5424

Browse files
GliniakTriang3l
authored andcommitted
[VFS] Fixed invalid month decoding in decode_fat_timestamp
1 parent 0f331b5 commit f6b5424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xenia/vfs/devices/stfs_xbox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ inline uint64_t decode_fat_timestamp(const uint32_t date, const uint32_t time) {
2424
struct tm tm = {0};
2525
// 80 is the difference between 1980 (FAT) and 1900 (tm);
2626
tm.tm_year = ((0xFE00 & date) >> 9) + 80;
27-
tm.tm_mon = ((0x01E0 & date) >> 5);
27+
tm.tm_mon = ((0x01E0 & date) >> 5) - 1;
2828
tm.tm_mday = (0x001F & date) >> 0;
2929
tm.tm_hour = (0xF800 & time) >> 11;
3030
tm.tm_min = (0x07E0 & time) >> 5;

0 commit comments

Comments
 (0)