From 03cf7cc56625a5227686e669693b2519f4a1fc55 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 25 Aug 2014 20:02:45 +0200 Subject: Correctly handle dialogs from previous versions that used 'TRUE' instead of 'VERA' as a value for GWLP_USERDATA. --- src/Format/Tcformat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Format/Tcformat.c') diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 3fd9ea31..1cf66b56 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -377,7 +377,8 @@ static void localcleanup (void) static BOOL CALLBACK BroadcastSysEncCfgUpdateCallb (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); -- cgit v1.2.3