Skip to content

Commit

Permalink
[VFS] Fixed invalid month decoding in decode_fat_timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Gliniak authored and Triang3l committed Sep 14, 2023
1 parent 0f331b5 commit f6b5424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xenia/vfs/devices/stfs_xbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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;
Expand Down

0 comments on commit f6b5424

Please sign in to comment.