aboutsummaryrefslogtreecommitdiff
path: root/src/l4daddon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/l4daddon.c')
-rw-r--r--src/l4daddon.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/l4daddon.c b/src/l4daddon.c
index fd344ce..5336199 100644
--- a/src/l4daddon.c
+++ b/src/l4daddon.c
@@ -18,6 +18,7 @@
#include <string.h>
+#include "chunklets/x86.h"
#include "con_.h"
#include "engineapi.h"
#include "errmsg.h"
@@ -31,7 +32,6 @@
#include "ppmagic.h"
#include "sst.h"
#include "vcall.h"
-#include "x86.h"
#include "x86util.h"
FEATURE("Left 4 Dead 2 addon bugfixes")
@@ -156,9 +156,8 @@ static inline bool find_FS_MAFAS() {
return false;
}
-static inline bool find_addonvecsz(con_cmdcb show_addon_metadata_cb) {
+static inline bool find_addonvecsz(const uchar *insns) {
#ifdef _WIN32
- const uchar *insns = (const uchar*)show_addon_metadata_cb;
// show_addon_metadata immediately checks if s_vecAddonMetadata.m_Size is 0,
// so we can just grab it from the CMP instruction
for (const uchar *p = insns; p - insns < 32;) {
@@ -224,7 +223,7 @@ static inline void try_fix_broken_addon_check() {
INIT {
struct con_cmd *show_addon_metadata = con_findcmd("show_addon_metadata");
if_cold (!show_addon_metadata) return FEAT_INCOMPAT; // shouldn't happen!
- if_cold (!find_addonvecsz(show_addon_metadata->cb)) {
+ if_cold (!find_addonvecsz(show_addon_metadata->cb_insns)) {
errmsg_errorx("couldn't find pointer to addon list");
return FEAT_INCOMPAT;
}