From 0c377ae10ea51e591d2a394f3519d76fa4be3fe4 Mon Sep 17 00:00:00 2001 From: Echo J Date: Mon, 4 Nov 2024 16:09:14 +0200 Subject: [PATCH] DDraw: Cast the memcpy() source argument This works around the MinGW GCC type strictness --- DDraw/dllmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DDraw/dllmain.cpp b/DDraw/dllmain.cpp index e77a2d1..dccb841 100644 --- a/DDraw/dllmain.cpp +++ b/DDraw/dllmain.cpp @@ -197,7 +197,7 @@ static bool PatchIAT() static bool PatchIAT_ByPointers() { pOrgSystemParametersInfoA = SystemParametersInfoA; - memcpy( orgCode, pOrgSystemParametersInfoA, sizeof(orgCode) ); + memcpy( orgCode, reinterpret_cast(pOrgSystemParametersInfoA), sizeof(orgCode) ); Memory::VP::InjectHook( pOrgSystemParametersInfoA, SystemParametersInfoA_OverwritingHook, Memory::HookType::Jump ); return true; }