From eb61010ce2f1e9ed16f136500c6e76d2839bfd08 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 21 May 2023 17:27:33 +0200 Subject: Linux/macOS: Better handling of wrong PIM value in text mode (enhances PR#1026) --- src/Main/TextUserInterface.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp index e972163b..21d13a6f 100644 --- a/src/Main/TextUserInterface.cpp +++ b/src/Main/TextUserInterface.cpp @@ -1294,7 +1294,7 @@ namespace VeraCrypt options.Password = AskPassword (StringFormatter (_("Enter password for {0}"), wstring (*options.Path))); } - if (!options.TrueCryptMode /*&& (options.Pim < 0) re-ask in case of wrong value entered*/) + if (!options.TrueCryptMode && (options.Pim < 0)) { options.Pim = AskPim (StringFormatter (_("Enter PIM for {0}"), wstring (*options.Path))); } @@ -1346,12 +1346,14 @@ namespace VeraCrypt options.UseBackupHeaders = false; ShowInfo (e); options.Password.reset(); + options.Pim = -1; } } else { ShowInfo (e); options.Password.reset(); + options.Pim = -1; } ShowString (L"\n"); @@ -1360,6 +1362,7 @@ namespace VeraCrypt { ShowInfo (e); options.Password.reset(); + options.Pim = -1; } } -- cgit v1.2.3