Permalink
Browse files

Re-add empty flag checking

  • Loading branch information...
masonsbro committed Jun 12, 2013
1 parent 9d91542 commit 1e73d8942c43e31fe4c95c1975e4bc19581008ac
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main/java/com/sk89q/mclauncher/util/BasicArgsParser.java
@@ -48,6 +48,9 @@ public ArgsContext parse(String[] args) {
for (int i = 0; i < args.length; i++) {
String arg = args[i];
if (arg.startsWith("-")) {
+ if (arg.length() == 1) {
+ throw new IllegalArgumentException("Flag with no name");
+ }
String flag = arg.substring(1);
if (valueArgs.contains(flag)) {
wantingFlag = flag;

0 comments on commit 1e73d89

Please sign in to comment.