From 45ec89f98d4bc412b38b11393fb880b9163820d2 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 18 Sep 2022 08:48:12 +0200 Subject: [PATCH] Remove crash file --- src/client/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/client/main.cpp b/src/client/main.cpp index 8b8e3438..44d16e84 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -74,6 +74,16 @@ namespace utils::hook::set(utils::nt::library{}.get_iat_entry("kernel32.dll", "ExitProcess"), exit_hook); } + void remove_crash_file() + { + const utils::nt::library game{}; + const auto game_file = game.get_path(); + auto game_path = std::filesystem::path(game_file); + game_path.replace_extension(".start"); + + utils::io::remove_file(game_path.generic_string()); + } + bool run() { srand(uint32_t(time(nullptr)) ^ ~(GetTickCount() * GetCurrentProcessId())); @@ -91,6 +101,7 @@ namespace try { patch_imports(); + remove_crash_file(); if (!component_loader::pre_start()) {