VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-19 06:46:27 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-19 09:29:45 (GMT)
commit515895342820a9d0a35391ec4d316c3782a75768 (patch)
treeb3c64668eba1bd654914acd42e986d6f90d80462 /src/Main/CommandLineInterface.cpp
parent63818bcaa44b9ce0b59ac2c56afdee1f5e1976ba (diff)
downloadVeraCrypt-515895342820a9d0a35391ec4d316c3782a75768.zip
VeraCrypt-515895342820a9d0a35391ec4d316c3782a75768.tar.gz
User Interface enhancements for PIM
Diffstat (limited to 'src/Main/CommandLineInterface.cpp')
-rw-r--r--src/Main/CommandLineInterface.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp
index 7eaef07..c3c82f4 100644
--- a/src/Main/CommandLineInterface.cpp
+++ b/src/Main/CommandLineInterface.cpp
@@ -378,13 +378,16 @@ namespace VeraCrypt
try
{
ArgNewPim = StringConverter::ToInt32 (wstring (str));
- if (ArgNewPim < 0)
- throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
}
catch (...)
{
throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
}
+
+ if (ArgNewPim < 0)
+ throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
+ else if (ArgNewPim > 0 && ArgTrueCryptMode)
+ throw_err (LangString["PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE"]);
}
if (parser.Found (L"non-interactive"))
@@ -403,13 +406,16 @@ namespace VeraCrypt
try
{
ArgPim = StringConverter::ToInt32 (wstring (str));
- if (ArgPim < 0)
- throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
}
catch (...)
{
throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
}
+
+ if (ArgPim < 0)
+ throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
+ else if (ArgPim > 0 && ArgTrueCryptMode)
+ throw_err (LangString["PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE"]);
}
if (parser.Found (L"protect-hidden", &str))