Linux/macOS: Better handling of wrong PIM value in text mode (enhances PR#1026)

This commit is contained in:
Mounir IDRASSI 2023-05-21 17:27:33 +02:00
parent b05b18928f
commit eb61010ce2
No known key found for this signature in database
GPG Key ID: 02C30AE90FAE4A6F

View File

@ -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;
}
}