VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index a7c5e788..fc688bb1 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -8414,7 +8414,8 @@ void HandleDriveNotReadyError ()
BOOL CALLBACK CloseTCWindowsEnum (HWND hwnd, LPARAM lParam)
{
- if (GetWindowLongPtr (hwnd, GWLP_USERDATA) == (LONG_PTR) 'VERA')
+ LONG_PTR userDataVal = GetWindowLongPtr (hwnd, GWLP_USERDATA);
+ if ((userDataVal == (LONG_PTR) 'VERA') || (userDataVal == (LONG_PTR) 'TRUE')) // Prior to 1.0e, 'TRUE' was used for VeraCrypt dialogs
{
char name[1024] = { 0 };
GetWindowText (hwnd, name, sizeof (name) - 1);
@@ -8439,7 +8440,8 @@ BOOL CALLBACK FindTCWindowEnum (HWND hwnd, LPARAM lParam)
if (*(HWND *)lParam == hwnd)
return TRUE;
- if (GetWindowLongPtr (hwnd, GWLP_USERDATA) == (LONG_PTR) 'VERA')
+ LONG_PTR userDataVal = GetWindowLongPtr (hwnd, GWLP_USERDATA);
+ if ((userDataVal == (LONG_PTR) 'VERA') || (userDataVal == (LONG_PTR) 'TRUE')) // Prior to 1.0e, 'TRUE' was used for VeraCrypt dialogs
{
char name[32] = { 0 };
GetWindowText (hwnd, name, sizeof (name) - 1);