From 682b789dd532192db22882c4cdd9d237c4dbc904 Mon Sep 17 00:00:00 2001 From: Yoruma <168607605+Mahoyomu@users.noreply.github.com> Date: Mon, 22 Jul 2024 22:32:50 +0800 Subject: [PATCH] Fix variable use-without-initialization error in MSVC debug build --- irr/src/CIrrDeviceSDL.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/irr/src/CIrrDeviceSDL.cpp b/irr/src/CIrrDeviceSDL.cpp index eada520b8..2f72e6223 100644 --- a/irr/src/CIrrDeviceSDL.cpp +++ b/irr/src/CIrrDeviceSDL.cpp @@ -709,6 +709,7 @@ bool CIrrDeviceSDL::run() while (!Close && wrap_PollEvent(&SDL_event)) { // os::Printer::log("event: ", core::stringc((int)SDL_event.type).c_str(), ELL_INFORMATION); // just for debugging + memset(&irrevent, 0, sizeof(irrevent)); switch (SDL_event.type) { case SDL_MOUSEMOTION: {