fixed incorrect printf format
authorVictor Kirhenshtein <victor@netxms.org>
Sun, 12 Nov 2017 10:16:22 +0000 (12:16 +0200)
committerVictor Kirhenshtein <victor@netxms.org>
Sun, 12 Nov 2017 10:16:22 +0000 (12:16 +0200)
src/server/netxmsd/netxmsd.cpp

index 3763c56..44d28b7 100644 (file)
@@ -112,12 +112,11 @@ static BOOL ExecAndWait(char *pszCommand)
    return bSuccess;
 }
 
-/**
- * Create minidump of given process
- */
-
 #ifdef _WIN32
 
+/**
+* Create minidump of given process
+*/
 static void CreateMiniDump(DWORD pid)
 {
    HANDLE hFile, hProcess;
@@ -128,7 +127,7 @@ static void CreateMiniDump(DWORD pid)
        if (hProcess != NULL)
        {
       TCHAR fname[MAX_PATH];
-      _sntprintf(fname, MAX_PATH, _T("%s\\netxmsd-%u-%u.mdmp"), g_szDumpDir, pid, time(NULL));
+      _sntprintf(fname, MAX_PATH, _T("%s\\netxmsd-%u-%I64u.mdmp"), g_szDumpDir, pid, static_cast<UINT64>(time(NULL)));
                hFile = CreateFile(fname, GENERIC_WRITE, 0, NULL,
                                                                 CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
                if (hFile != INVALID_HANDLE_VALUE)