mirror of
https://github.com/gbevin/urlencoder.git
synced 2025-04-30 01:08:13 -07:00
Handle more invalid CLI argument usages.
This commit is contained in:
parent
ca82b1ec6d
commit
97bc6137a3
2 changed files with 16 additions and 2 deletions
|
@ -237,9 +237,9 @@ public final class UrlEncoder {
|
|||
var option = args.remove(0);
|
||||
if (option.equals("-d")) {
|
||||
perform_decode = true;
|
||||
valid_arguments = !args.isEmpty();
|
||||
valid_arguments = (args.size() == 1);
|
||||
} else if (option.equals("-e")) {
|
||||
valid_arguments = !args.isEmpty();
|
||||
valid_arguments = (args.size() == 1);
|
||||
} else {
|
||||
args.clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue