From e3529ca48fbeb4b1aa3b2ce68241956e16b1393e Mon Sep 17 00:00:00 2001 From: Anonymous275 Date: Fri, 6 Nov 2020 01:21:09 +0200 Subject: [PATCH] debug fix --- CMakeLists.txt | 1 + src/Security/Checker.cpp | 4 ++++ src/Startup.cpp | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dd16ae..a82f631 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(Launcher) set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") file(GLOB source_files "src/*.cpp" "src/*/*.cpp" "src/*/*.hpp" "include/*.h" "include/*/*.h") add_executable(${PROJECT_NAME} ${source_files}) set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "BeamMP-Launcher") diff --git a/src/Security/Checker.cpp b/src/Security/Checker.cpp index 715cafa..b594193 100644 --- a/src/Security/Checker.cpp +++ b/src/Security/Checker.cpp @@ -10,6 +10,7 @@ #include #include void DAS(){ +#ifndef DEBUG int i = 0; std::ifstream f(GetEN(), std::ios::binary); f.seekg(0, std::ios_base::end); @@ -20,8 +21,10 @@ void DAS(){ } if(i)DAboard(); f.close(); +#endif } void DASM(){ //A mirror to have 2 independent checks +#ifndef DEBUG int i = 0; std::ifstream f(GetEN(), std::ios::binary); f.seekg(0, std::ios_base::end); @@ -32,6 +35,7 @@ void DASM(){ //A mirror to have 2 independent checks } if(i)DAboard(); f.close(); +#endif } DWORD getParentPID(DWORD pid){ HANDLE h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); diff --git a/src/Startup.cpp b/src/Startup.cpp index 7ff93c3..929c593 100644 --- a/src/Startup.cpp +++ b/src/Startup.cpp @@ -23,7 +23,7 @@ std::string GetVer(){ return r; } std::string GetPatch(){ - static std::string r = Sec(".5"); + static std::string r = Sec(".7"); return r; } void ReLaunch(int argc,char*args[]){