From 85fa987f673e164258292fbfb3c853ced9f264c0 Mon Sep 17 00:00:00 2001 From: hongqingwan Date: Thu, 25 Sep 2025 13:43:11 +0800 Subject: [PATCH] frontend: Fix runtime check failure issue Fix an issue where the stack around the variable snapEnabled was corrupted. SPI_GETSNAPTODEFBUTTON should use BOOL, not bool. Reference: * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfow --- frontend/components/SourceTreeItem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/SourceTreeItem.cpp b/frontend/components/SourceTreeItem.cpp index 775348a5d..66b19f1e0 100644 --- a/frontend/components/SourceTreeItem.cpp +++ b/frontend/components/SourceTreeItem.cpp @@ -290,7 +290,7 @@ void SourceTreeItem::mouseDoubleClickEvent(QMouseEvent *event) * the application to hang when double clicking the sources list and the * Windows setting 'Snap mouse to default button in dialog boxes' is enabled. */ - bool snapEnabled; + BOOL snapEnabled = FALSE; SystemParametersInfo(SPI_GETSNAPTODEFBUTTON, 0, &snapEnabled, 0); if (snapEnabled) {