Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Oct 8, 2024
1 parent dd3252a commit d4b1d80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions fallguys/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
auto pFound = LOCATE_FROM_SIGNATURE_FROM_FUNCTION(searchBegin, searchEnd - searchBegin, pattern);
if (pFound)
{
auto g_groupmask_instruction = pFound + 4;
auto g_groupop_instruction = pFound + 14;
auto g_groupmask_instruction = (char *)pFound + 4;
auto g_groupop_instruction = (char*)pFound + 14;

if (1)
{
Expand All @@ -480,7 +480,6 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
if (ctx.result)
{
pg_groupmask = (decltype(pg_groupmask))ctx.result;
break;
}
}

Expand All @@ -495,10 +494,12 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
if (ctx.result)
{
pg_groupop = (decltype(pg_groupop))ctx.result;
break;
}
}

if (pg_groupop)
break;

searchBegin = (char *)pFound + sizeof(pattern) - 1;
}
else
Expand Down
2 changes: 1 addition & 1 deletion metamod/signatures_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if (!g_pfn_##name)\
#define FILL_FROM_SIGNATURE_TY(dll, name, ty) g_pfn_##name = g_call_original_##name = (decltype(g_pfn_##name))LOCATE_FROM_SIGNATURE(dll, name##_Signature_##ty);\
if (!g_pfn_##name)\
{\
LOG_ERROR(PLID, "Failed to locate " #name " from " #dll ## " (" ## (#ty) ## ") dll !");\
LOG_ERROR(PLID, "Failed to locate " #name " from " #dll " dll !");\
return FALSE;\
}

Expand Down

0 comments on commit d4b1d80

Please sign in to comment.