Use static cast and check binary.
This commit is contained in:
parent
86e1faabc3
commit
19a4c62617
@ -61,12 +61,12 @@ namespace Assets
|
||||
|
||||
if (animCoordX.is_number())
|
||||
{
|
||||
material->textureAtlasColumnCount = (char)animCoordX.number_value() & 0xFF;
|
||||
material->textureAtlasColumnCount = static_cast<char>(animCoordX.number_value()) & 0xFF;
|
||||
}
|
||||
|
||||
if (animCoordY.is_number())
|
||||
{
|
||||
material->textureAtlasRowCount = (char)animCoordY.number_value() & 0xFF;
|
||||
material->textureAtlasRowCount = static_cast<char>(animCoordY.number_value()) & 0xFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -121,7 +121,7 @@ namespace Assets
|
||||
material->textureTable = 0;
|
||||
}
|
||||
|
||||
material->textureCount = (char)textureList.size() & 0xFF;
|
||||
material->textureCount = static_cast<char>(textureList.size()) & 0xFF;
|
||||
}
|
||||
|
||||
header->material = material;
|
||||
|
@ -20,6 +20,12 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser
|
||||
{
|
||||
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
// Ensure we're working with our desired binary
|
||||
if (Utils::Hook::Get<DWORD>(0x6BAC0F) != 0xF44EE8)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD oldProtect;
|
||||
VirtualProtect(GetModuleHandle(NULL), 0x6C73000, PAGE_EXECUTE_READWRITE, &oldProtect);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user