diff options
author | George Hazan <george.hazan@gmail.com> | 2015-03-22 14:26:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-03-22 14:26:24 +0000 |
commit | c30775dbdc790437a511e11ca8c839fe367e2f32 (patch) | |
tree | 32e3a8f4acf4229c7cabc48e12e67c82e5f829db /tools/MakeDef/MakeDefs.cpp | |
parent | aebb257da0067c98c292bc62ad73200cc3a9dba7 (diff) |
bugfix: temporary file name gets broken
git-svn-id: http://svn.miranda-ng.org/main/trunk@12474 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/MakeDef/MakeDefs.cpp')
-rw-r--r-- | tools/MakeDef/MakeDefs.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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++;
|