Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Oct 8, 2024
1 parent 962e5fa commit 4fbda29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions fallguys/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
return FALSE;
}

LOG_MESSAGE(PLID, "Engine Type: %s", gpMetaUtilFuncs->pfnGetEngineType());
LOG_MESSAGE(PLID, "Current engine type: %s!", gpMetaUtilFuncs->pfnGetEngineType());

#ifdef _WIN32

Expand Down Expand Up @@ -363,8 +363,8 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
{
char pattern[] = host_frametime_Signature;

auto searchBegin = (PUCHAR)engineBase;
auto searchEnd = (PUCHAR)engineBase + gpMetaUtilFuncs->pfnGetImageSize(engineBase);
auto searchBegin = (char *)engineBase;
auto searchEnd = (char *)engineBase + gpMetaUtilFuncs->pfnGetImageSize(engineBase);
while (1)
{
auto pFound = LOCATE_FROM_SIGNATURE_FROM_FUNCTION(searchBegin, searchEnd - searchBegin, pattern);
Expand All @@ -384,7 +384,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
break;
}

searchBegin = (PUCHAR)pFound + sizeof(pattern) - 1;
searchBegin = (char *)pFound + sizeof(pattern) - 1;
}
else
{
Expand Down Expand Up @@ -425,8 +425,8 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
{
char pattern[] = sv_areanodes_Signature;

auto searchBegin = (PUCHAR)engineBase;
auto searchEnd = (PUCHAR)engineBase + gpMetaUtilFuncs->pfnGetImageSize(engineBase);
auto searchBegin = (char *)engineBase;
auto searchEnd = (char *)engineBase + gpMetaUtilFuncs->pfnGetImageSize(engineBase);
while (1)
{
auto pFound = LOCATE_FROM_SIGNATURE_FROM_FUNCTION(searchBegin, searchEnd - searchBegin, pattern);
Expand All @@ -446,7 +446,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
break;
}

searchBegin = (PUCHAR)pFound + sizeof(pattern) - 1;
searchBegin = (char *)pFound + sizeof(pattern) - 1;
}
else
{
Expand All @@ -466,8 +466,8 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
{
char pattern[] = PF_SetGroupMask_Signature;

auto searchBegin = (PUCHAR)engineBase;
auto searchEnd = (PUCHAR)engineBase + gpMetaUtilFuncs->pfnGetImageSize(engineBase);
auto searchBegin = (char *)engineBase;
auto searchEnd = (char *)engineBase + gpMetaUtilFuncs->pfnGetImageSize(engineBase);
while (1)
{
auto pFound = LOCATE_FROM_SIGNATURE_FROM_FUNCTION(searchBegin, searchEnd - searchBegin, pattern);
Expand Down Expand Up @@ -506,7 +506,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
}
}

searchBegin = (PUCHAR)pFound + sizeof(pattern) - 1;
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 @@ -106,7 +106,7 @@ if (!Caller_of_##name)\
LOG_ERROR(PLID, "Failed to locate Caller of " #name " from " #dll " dll !");\
return FALSE;\
}\
g_pfn_##name = g_call_original_##name = (decltype(g_pfn_##name))gpMetaUtilFuncs->pfnGetNextCallAddr(Caller_of_##name + (sizeof(name##_Signature) - 1) + (offset), 1);\
g_pfn_##name = g_call_original_##name = (decltype(g_pfn_##name))gpMetaUtilFuncs->pfnGetNextCallAddr(Caller_of_##name + (sizeof(name##_Signature_##ty) - 1) + (offset), 1);\
if (!gpMetaUtilFuncs->pfnIsAddressInModuleRange((void *)g_pfn_##name, dll##Base))\
{\
LOG_ERROR(PLID, "Failed to locate " #name " from " #dll " dll !"); \
Expand Down

0 comments on commit 4fbda29

Please sign in to comment.