From c30775dbdc790437a511e11ca8c839fe367e2f32 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 22 Mar 2015 14:26:24 +0000 Subject: bugfix: temporary file name gets broken git-svn-id: http://svn.miranda-ng.org/main/trunk@12474 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/MakeDef/MakeDef.exe | Bin 16384 -> 16384 bytes tools/MakeDef/MakeDef64.exe | Bin 18944 -> 18944 bytes tools/MakeDef/MakeDefs.cpp | 7 ++++--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/MakeDef/MakeDef.exe b/tools/MakeDef/MakeDef.exe index b173e5286e..85b76fd981 100644 Binary files a/tools/MakeDef/MakeDef.exe and b/tools/MakeDef/MakeDef.exe differ diff --git a/tools/MakeDef/MakeDef64.exe b/tools/MakeDef/MakeDef64.exe index e9e2e812f3..c6f7aba340 100644 Binary files a/tools/MakeDef/MakeDef64.exe and b/tools/MakeDef/MakeDef64.exe differ diff --git a/tools/MakeDef/MakeDefs.cpp b/tools/MakeDef/MakeDefs.cpp index 0179a4d53f..c7401a99ae 100644 --- a/tools/MakeDef/MakeDefs.cpp +++ b/tools/MakeDef/MakeDefs.cpp @@ -345,10 +345,10 @@ LBL_Usage: int tResult = 0, tLineNo = 0; - char tBuffer[1024]; - strncpy_s(tBuffer, "mkdXXXXXX", _TRUNCATE); + char tTemplate[MAX_PATH]; + strncpy_s(tTemplate, "mkdXXXXXX", _TRUNCATE); - char *tTemplate = _mktemp(tBuffer); + _mktemp(tTemplate); FILE* tTempFile = fopen(tTemplate, "wt"); if (tTempFile == NULL) { fprintf(stderr, "Unable to create temporary file %s\n", tTemplate); @@ -368,6 +368,7 @@ LBL_Usage: else { fprintf(stderr, "Processing DEF file: '%s'...\n", tDefFileName); + char tBuffer[1024]; while (fgets(tBuffer, sizeof(tBuffer), tInFile) != NULL) { fputs(tBuffer, tTempFile); tLineNo++; -- cgit v1.2.3