fix: windows-gcc-x86 build

This commit is contained in:
jeefo 2024-01-19 00:15:28 +03:00
commit 317747aced
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -140,7 +140,7 @@ SharedLibrary::Func DynamicLinkerHook::lookup (SharedLibrary::Handle module, con
bool DynamicLinkerHook::callPlayerFunction (edict_t *ent) { bool DynamicLinkerHook::callPlayerFunction (edict_t *ent) {
auto callPlayer = [&] () { auto callPlayer = [&] () {
reinterpret_cast <EntityProto> (m_exports["player"]) (&ent->v); reinterpret_cast <EntityProto> (reinterpret_cast <void *> (m_exports["player"])) (&ent->v);
}; };
if (m_exports.exists ("player")) { if (m_exports.exists ("player")) {
@ -153,7 +153,7 @@ bool DynamicLinkerHook::callPlayerFunction (edict_t *ent) {
logger.error ("Cannot resolve player() function in GameDLL."); logger.error ("Cannot resolve player() function in GameDLL.");
return false; return false;
} }
m_exports["player"] = reinterpret_cast <SharedLibrary::Func> (playerFunction); m_exports["player"] = reinterpret_cast <SharedLibrary::Func> (reinterpret_cast <void *> (playerFunction));
callPlayer (); callPlayer ();
return true; return true;