diff --git a/DDraw/dllmain.cpp b/DDraw/dllmain.cpp index 306719d..f528040 100644 --- a/DDraw/dllmain.cpp +++ b/DDraw/dllmain.cpp @@ -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) { diff --git a/SilentPatchIII/SilentPatchIII.cpp b/SilentPatchIII/SilentPatchIII.cpp index 688e0c5..29cb108 100644 --- a/SilentPatchIII/SilentPatchIII.cpp +++ b/SilentPatchIII/SilentPatchIII.cpp @@ -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); diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index b20c821..7001213 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -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(0x746363, desktop.right); Patch(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(0x746BE3, desktop.right); Patch(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(0x780219, desktop.right); Patch(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(0x77A3EF, desktop.right); Patch(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(0x77A41F, desktop.right); Patch(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(0x77A30F, desktop.right); Patch(0x77A314, desktop.bottom); diff --git a/SilentPatchVC/SilentPatchVC.cpp b/SilentPatchVC/SilentPatchVC.cpp index 683aa47..bc87f13 100644 --- a/SilentPatchVC/SilentPatchVC.cpp +++ b/SilentPatchVC/SilentPatchVC.cpp @@ -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);