We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4dbe19d + 52d8f39 commit e135172Copy full SHA for e135172
src/FileEncryptor.java
@@ -124,7 +124,7 @@ public static void main(String[] args) throws Exception {
124
125
// Check if password and/or file paths have been specified
126
if (argIndex + 2 >= charArgs.length) { throw new IllegalArgumentException("Not enough arguments specified" + ERROR_MSG); }
127
- if (argIndex + 2 <= charArgs.length) { throw new IllegalArgumentException("Invalid arguments please refer to instructions" + ERROR_MSG); }
+ if (argIndex + 2 < charArgs.length - 1) { throw new IllegalArgumentException("Invalid arguments please refer to instructions" + ERROR_MSG); }
128
129
encrypt(charArgs[argIndex], new String(charArgs[argIndex + 1]), new String(charArgs[argIndex + 2]));
130
0 commit comments