diff --git a/GS-IPv6-Forwarder b/GS-IPv6-Forwarder index 41ab166..48c0136 160000 --- a/GS-IPv6-Forwarder +++ b/GS-IPv6-Forwarder @@ -1 +1 @@ -Subproject commit 41ab166b8a06a322fc130917996bcf5ddf12d769 +Subproject commit 48c0136b9d65fd3901de2d2593d98528ca5d1906 diff --git a/miss/miss.cpp b/miss/miss.cpp index 0480240..50de692 100644 --- a/miss/miss.cpp +++ b/miss/miss.cpp @@ -842,7 +842,11 @@ void ResetLogFile(bool standaloneExe) MoveFileExA(currentLogFilePath, oldLogFilePath, MOVEFILE_REPLACE_EXISTING); // Redirect stdout to this new file - freopen(currentLogFilePath, "w", stdout); + if (freopen(currentLogFilePath, "w", stdout) == NULL) { + // If we couldn't create a log file, just redirect stdout to NUL. + // We have to open _something_ or printf() will crash. + freopen("NUL", "w", stdout); + } } // Print a log header