[MinidumpUpload] Fix crash

This commit is contained in:
momo5502 2017-01-08 22:36:50 +01:00
parent 2e4c234aa3
commit 6661c72053

View File

@ -204,7 +204,7 @@ namespace Components
strftime(filenameFriendlyTime, sizeof(filenameFriendlyTime) - 1, "%Y%m%d%H%M%S", &ltime); strftime(filenameFriendlyTime, sizeof(filenameFriendlyTime) - 1, "%Y%m%d%H%M%S", &ltime);
// Combine with queuedMinidumpsFolder // Combine with queuedMinidumpsFolder
char filename[MAX_PATH]; char filename[MAX_PATH] = { 0 };
PathCombineA(filename, MinidumpUpload::queuedMinidumpsFolder.data(), Utils::String::VA("%s-" VERSION "-%s.dmp", exeFileName, filenameFriendlyTime)); PathCombineA(filename, MinidumpUpload::queuedMinidumpsFolder.data(), Utils::String::VA("%s-" VERSION "-%s.dmp", exeFileName, filenameFriendlyTime));
// Generate the dump // Generate the dump
@ -237,7 +237,7 @@ namespace Components
// Walk through directory and search for valid minidumps // Walk through directory and search for valid minidumps
WIN32_FIND_DATAA ffd; WIN32_FIND_DATAA ffd;
HANDLE hFind = FindFirstFileA(Utils::String::VA("%s\\*.dmp", MinidumpUpload::queuedMinidumpsFolder), &ffd); HANDLE hFind = FindFirstFileA(Utils::String::VA("%s\\*.dmp", MinidumpUpload::queuedMinidumpsFolder.data()), &ffd);
if (hFind != INVALID_HANDLE_VALUE) if (hFind != INVALID_HANDLE_VALUE)
{ {
do do