aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/exploitfixes_utf8parser.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-08-22 21:59:18 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-08-22 21:59:18 +0100
commitee8ae568bc42cb5311edd7294eb0f8f2ae078bd1 (patch)
tree9cb1cdb308d81772812cd4456f94634ee10b6670 /NorthstarDLL/exploitfixes_utf8parser.cpp
parent921668fd9578d514258edec7432b656cc5d7041d (diff)
downloadNorthstarLauncher-ee8ae568bc42cb5311edd7294eb0f8f2ae078bd1.tar.gz
NorthstarLauncher-ee8ae568bc42cb5311edd7294eb0f8f2ae078bd1.zip
add more prs
Diffstat (limited to 'NorthstarDLL/exploitfixes_utf8parser.cpp')
-rw-r--r--NorthstarDLL/exploitfixes_utf8parser.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/NorthstarDLL/exploitfixes_utf8parser.cpp b/NorthstarDLL/exploitfixes_utf8parser.cpp
index 84b7cbc6..581596a7 100644
--- a/NorthstarDLL/exploitfixes_utf8parser.cpp
+++ b/NorthstarDLL/exploitfixes_utf8parser.cpp
@@ -176,7 +176,13 @@ bool, __fastcall, (INT64* a1, DWORD* a2, char* strData)) // 48 89 5C 24 ? 48 89
static void* targetRetAddr = CModule("engine.dll").FindPattern("84 C0 75 2C 49 8B 16");
// only call if we're parsing utf8 data from the network (i.e. communities), otherwise we get perf issues
- if (_ReturnAddress() == targetRetAddr && !CheckUTF8Valid(a1, a2, strData))
+ if (
+#ifdef _MSC_VER
+ _ReturnAddress()
+#else
+ __builtin_return_address(0)
+#endif
+ == targetRetAddr && !CheckUTF8Valid(a1, a2, strData))
return false;
return Rson_ParseUTF8(a1, a2, strData);