From 44339c3d6766f63b9563955ab4cbe33465fc8542 Mon Sep 17 00:00:00 2001 From: ZXShady Date: Sun, 21 Jul 2024 19:36:14 +0000 Subject: [PATCH] Fix event handling stack corruption on MSVC --- include/SFML/Window/WindowBase.inl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/SFML/Window/WindowBase.inl b/include/SFML/Window/WindowBase.inl index b1764892a..e1af3c79e 100644 --- a/include/SFML/Window/WindowBase.inl +++ b/include/SFML/Window/WindowBase.inl @@ -39,6 +39,9 @@ template struct OverloadSet : Ts... { using Ts::operator()...; +#if defined(_MSC_VER) && !defined(__clang__) + unsigned char dummy; // Dummy variable to ensure that this struct is not empty thus avoiding a crash due to an MSVC bug +#endif }; template OverloadSet(Ts...) -> OverloadSet;