Fixed main method usage when text is missing for encode or decode

This commit is contained in:
Geert Bevin 2023-01-01 16:55:18 -05:00
parent a5dfff64a0
commit ca82b1ec6d
2 changed files with 16 additions and 2 deletions

View file

@ -237,9 +237,9 @@ public final class UrlEncoder {
var option = args.remove(0);
if (option.equals("-d")) {
perform_decode = true;
valid_arguments = true;
valid_arguments = !args.isEmpty();
} else if (option.equals("-e")) {
valid_arguments = true;
valid_arguments = !args.isEmpty();
} else {
args.clear();
}