From 20d8c4a6eb317d14fa82f09c9be6cbe7c7627ddb Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Sat, 24 May 2025 19:02:30 +0200 Subject: [PATCH] Port https://github.com/x64dbg/TitanEngine/pull/23 --- TitanEngineEmulator/TitanEngineEmulator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TitanEngineEmulator/TitanEngineEmulator.cpp b/TitanEngineEmulator/TitanEngineEmulator.cpp index 5c0fa41..ad4de37 100644 --- a/TitanEngineEmulator/TitanEngineEmulator.cpp +++ b/TitanEngineEmulator/TitanEngineEmulator.cpp @@ -289,7 +289,7 @@ static bool GetAVX512ContextFallbackToAVX(HANDLE hActiveThread, TITAN_ENGINE_CON { // Fall back to using AVX and fill the rest with 0 TITAN_ENGINE_CONTEXT_t Avx; - memset(&Avx, 0, sizeof(Avx)); + memset(titcontext, 0, sizeof(*titcontext)); if (GetAVXContext(hActiveThread, &Avx)) { for (int i = 0; i < _countof(Avx.YmmRegisters); i++) titcontext->ZmmRegisters[i].Low = Avx.YmmRegisters[i];