summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-03-22 14:26:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-03-22 14:26:24 +0000
commitc30775dbdc790437a511e11ca8c839fe367e2f32 (patch)
tree32e3a8f4acf4229c7cabc48e12e67c82e5f829db
parentaebb257da0067c98c292bc62ad73200cc3a9dba7 (diff)
bugfix: temporary file name gets broken
git-svn-id: http://svn.miranda-ng.org/main/trunk@12474 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--tools/MakeDef/MakeDef.exebin16384 -> 16384 bytes
-rw-r--r--tools/MakeDef/MakeDef64.exebin18944 -> 18944 bytes
-rw-r--r--tools/MakeDef/MakeDefs.cpp7
3 files changed, 4 insertions, 3 deletions
diff --git a/tools/MakeDef/MakeDef.exe b/tools/MakeDef/MakeDef.exe
index b173e5286e..85b76fd981 100644
--- a/tools/MakeDef/MakeDef.exe
+++ b/tools/MakeDef/MakeDef.exe
Binary files differ
diff --git a/tools/MakeDef/MakeDef64.exe b/tools/MakeDef/MakeDef64.exe
index e9e2e812f3..c6f7aba340 100644
--- a/tools/MakeDef/MakeDef64.exe
+++ b/tools/MakeDef/MakeDef64.exe
Binary files 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++;