mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-25 14:52:30 +01:00
safe sprintfs
This commit is contained in:
parent
1c40c65c05
commit
b64fb9b389
@ -50,7 +50,7 @@ void InjectHooks()
|
||||
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
sprintf(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
if (*(DWORD*)0x5C1E75 == 0xB85548EC)
|
||||
{
|
||||
|
@ -675,7 +675,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
sprintf(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
if (*(DWORD*)0x5C1E75 == 0xB85548EC) Patch_III_10(desktop);
|
||||
else if (*(DWORD*)0x5C2135 == 0xB85548EC) Patch_III_11(desktop);
|
||||
|
@ -2597,7 +2597,7 @@ void Patch_SA_10()
|
||||
// Default resolution to native resolution
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
_snprintf(aNoDesktopMode, sizeof(aNoDesktopMode), "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
Patch<DWORD>(0x746363, desktop.right);
|
||||
Patch<DWORD>(0x746368, desktop.bottom);
|
||||
@ -2894,7 +2894,7 @@ void Patch_SA_11()
|
||||
// Default resolution to native resolution
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
_snprintf(aNoDesktopMode, sizeof(aNoDesktopMode), "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
Patch<DWORD>(0x746BE3, desktop.right);
|
||||
Patch<DWORD>(0x746BE8, desktop.bottom);
|
||||
@ -3147,7 +3147,7 @@ void Patch_SA_Steam()
|
||||
// Default resolution to native resolution
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
_snprintf(aNoDesktopMode, sizeof(aNoDesktopMode), "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
Patch<DWORD>(0x780219, desktop.right);
|
||||
Patch<DWORD>(0x78021E, desktop.bottom);
|
||||
@ -3294,7 +3294,7 @@ void Patch_SA_NewSteam_r1()
|
||||
// Default resolution to native resolution
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
_snprintf(aNoDesktopMode, sizeof(aNoDesktopMode), "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
Patch<DWORD>(0x77A3EF, desktop.right);
|
||||
Patch<DWORD>(0x77A3F4, desktop.bottom);
|
||||
@ -3351,7 +3351,7 @@ void Patch_SA_NewSteam_r2()
|
||||
// Default resolution to native resolution
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
_snprintf(aNoDesktopMode, sizeof(aNoDesktopMode), "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
Patch<DWORD>(0x77A41F, desktop.right);
|
||||
Patch<DWORD>(0x77A424, desktop.bottom);
|
||||
@ -3439,7 +3439,7 @@ void Patch_SA_NewSteam_r2_lv()
|
||||
// Default resolution to native resolution
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
_snprintf(aNoDesktopMode, sizeof(aNoDesktopMode), "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
Patch<DWORD>(0x77A30F, desktop.right);
|
||||
Patch<DWORD>(0x77A314, desktop.bottom);
|
||||
|
@ -503,7 +503,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
RECT desktop;
|
||||
GetWindowRect(GetDesktopWindow(), &desktop);
|
||||
sprintf(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
sprintf_s(aNoDesktopMode, "Cannot find %dx%dx32 video mode", desktop.right, desktop.bottom);
|
||||
|
||||
if(*(DWORD*)0x667BF5 == 0xB85548EC) Patch_VC_10(desktop);
|
||||
else if(*(DWORD*)0x667C45 == 0xB85548EC) Patch_VC_11(desktop);
|
||||
|
Loading…
Reference in New Issue
Block a user