V45.40: fix bridge crash-dump hardcode duong dan may dev (C:/Users/locpham/...) -> %TEMP%\sf_dumps (GetTempPathA) - audit cross-machine. Rebuild bridge+engine+installer NSIS/MSI v=202609021627.

This commit is contained in:
2026-09-02 16:50:02 +07:00
parent b153850d5c
commit d8e5f52017
9 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -627,7 +627,9 @@ static LONG WINAPI CrashDumpHandler(EXCEPTION_POINTERS* ep) {
std::cerr << "[CRASH] faulting module: " << modPath << std::endl;
}
}
const char* dumpDir = "C:/Users/locpham/AppData/Local/Temp/sf_dumps";
char dumpDir[MAX_PATH];
if (!GetTempPathA(MAX_PATH, dumpDir)) return EXCEPTION_CONTINUE_SEARCH;
std::strncat(dumpDir, "sf_dumps", MAX_PATH - std::strlen(dumpDir) - 1);
CreateDirectoryA(dumpDir, nullptr);
char dumpPath[MAX_PATH];
snprintf(dumpPath, sizeof(dumpPath), "%s/bridge_crash_%lu.dmp", dumpDir, GetCurrentProcessId());