1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-24 11:31:31 +00:00

Fixed an error in the conversion function from Unix time to FILETIME.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5639 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-04-03 13:27:19 +00:00
parent 7287d86dd1
commit 2cd0b5ae91

View File

@ -84,7 +84,7 @@ static FILETIME* UnixTimeToFileTime (time_t T, FILETIME* FT)
*/
static const ULARGE_INTEGER Offs = { 0xB6109100UL, 0x00000020UL };
ULARGE_INTEGER V;
V.QuadPart = (unsigned __int64) T * 10000000U + Offs.QuadPart;
V.QuadPart = ((unsigned __int64) T + Offs.QuadPart) * 10000000U;
FT->dwLowDateTime = V.LowPart;
FT->dwHighDateTime = V.HighPart;
return FT;