From bcd1a539c92c921bd3cd8936bfdd57a7672edf9b Mon Sep 17 00:00:00 2001 From: Loukious Date: Tue, 12 Nov 2024 19:13:48 +0100 Subject: [PATCH] chore: Initialize Discord Rich Presence structure to prevent undefined behavior --- dllmain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dllmain.cpp b/dllmain.cpp index 1451232..1ed8d9e 100644 --- a/dllmain.cpp +++ b/dllmain.cpp @@ -41,7 +41,7 @@ static void UpdateDiscordPresence() { if (videoTime > 0) { Video vid; DiscordRichPresence discordRichPresence; - + memset(&discordRichPresence, 0, sizeof(discordRichPresence)); std::vector videoId = vid.getvidinfo(); std::string currentInfoStr = vid.join(videoId, ":"); if (oldinfo != currentInfoStr) { @@ -107,7 +107,7 @@ static void UpdateDiscordPresence() { DWORD WINAPI MainThread(LPVOID param) { g_discord->initialize(); - + g_memoryUtility->initialize();