]> git.sur5r.net Git - cc65/commitdiff
Fixed an error in the conversion function from Unix time to FILETIME.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 3 Apr 2012 13:27:19 +0000 (13:27 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 3 Apr 2012 13:27:19 +0000 (13:27 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5639 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/common/filetime.c

index e617534bd605e888cbabd3e2424ab547142c3f6b..b621b9e57df14a0c637f78319a51f66162277ca9 100644 (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;