VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-03-02 00:14:25 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-03-02 00:23:58 +0100
commit8e6707cc22846e48c62e4730980cfe17595f8c2c (patch)
treea666986f2933150b78c3b18fadf3c8251a30a25f /src/Common/Dlgcode.c
parentf09f8e3a317ccfd3eaeb21a0c83b04f95dbbecfb (diff)
downloadVeraCrypt-8e6707cc22846e48c62e4730980cfe17595f8c2c.tar.gz
VeraCrypt-8e6707cc22846e48c62e4730980cfe17595f8c2c.zip
Windows: if TrueCrypt volume created with a version prior to 6.0, display this version in the error message to help users understand why it is not working.
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 6503c599..6ae4062f 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -3978,7 +3978,7 @@ void handleError (HWND hwndDlg, int code)
if (Silent) return;
- switch (code)
+ switch (code & 0x0000FFFF)
{
case ERR_OS_ERROR:
handleWin32Error (hwndDlg);
@@ -4072,7 +4072,8 @@ void handleError (HWND hwndDlg, int code)
break;
case ERR_UNSUPPORTED_TRUECRYPT_FORMAT:
- MessageBoxW (hwndDlg, GetString ("UNSUPPORTED_TRUECRYPT_FORMAT"), lpszTitle, ICON_HAND);
+ StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("UNSUPPORTED_TRUECRYPT_FORMAT"), (code >> 24), (code >> 16) & 0x000000FF);
+ MessageBoxW (hwndDlg, szTmp, lpszTitle, ICON_HAND);
break;
default: