From ce6127ae96022ce6e803a876a2e39eed7bd754ea Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Sun, 26 Dec 2021 05:22:33 +0000 Subject: fix potentially unsafe concommand --- NorthstarDedicatedTest/miscserverfixes.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 NorthstarDedicatedTest/miscserverfixes.cpp (limited to 'NorthstarDedicatedTest/miscserverfixes.cpp') diff --git a/NorthstarDedicatedTest/miscserverfixes.cpp b/NorthstarDedicatedTest/miscserverfixes.cpp new file mode 100644 index 00000000..2007a30c --- /dev/null +++ b/NorthstarDedicatedTest/miscserverfixes.cpp @@ -0,0 +1,13 @@ +#include "pch.h" +#include "miscserverfixes.h" +#include "hookutils.h" + +void InitialiseMiscServerFixes(HMODULE baseAddress) +{ + // ret at the start of the concommand GenerateObjFile as it can crash servers + { + void* ptr = (char*)baseAddress + 0x38D920; + TempReadWrite rw(ptr); + *((char*)ptr) = (char)0xC3; + } +} \ No newline at end of file -- cgit v1.2.3