From 9452547a27bc4dfd19653ace992e33f764f565a7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 14 Aug 2022 12:39:09 +0300 Subject: fixes #3156 (TabSRMM: warning dialog) --- plugins/TabSRMM/src/utils.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/TabSRMM/src/utils.cpp') diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index be370dfaf8..db0f20b3a6 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -680,7 +680,7 @@ LRESULT CWarning::show(const int uId, uint32_t dwFlags, const wchar_t* tszTxt) uint32_t val = M.GetDword("cWarningsL", 0); uint32_t mask = ((__int64)1L) << uId; if (mask & val) { - bool bResult = (M.GetDword("cWarningsV", 0xFFFFFFFF) & mask) != 0; + bool bResult = (M.GetDword("cWarningsV", 0) & mask) != 0; if (dwFlags & MB_YESNO || dwFlags & MB_YESNOCANCEL) return (bResult) ? IDYES : IDNO; return IDOK; @@ -820,10 +820,11 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (::IsDlgButtonChecked(hwnd, IDC_DONTSHOWAGAIN)) { uint32_t newVal = M.GetDword("cWarningsL", 0) | ((uint32_t)1L << m_uId); db_set_dw(0, SRMSGMOD_T, "cWarningsL", newVal); - } - if (LOWORD(wParam) != IDNO) { - uint32_t newVal = M.GetDword("cWarningsV", 0) | ((uint32_t)1L << m_uId); - db_set_dw(0, SRMSGMOD_T, "cWarningsV", newVal); + + if (LOWORD(wParam) != IDNO) { + newVal = M.GetDword("cWarningsV", 0) | ((uint32_t)1L << m_uId); + db_set_dw(0, SRMSGMOD_T, "cWarningsV", newVal); + } } __fallthrough; -- cgit v1.2.3