Fix parsing of the value of the last parameter

This commit is contained in:
Phoenix616 2020-07-02 20:31:46 +01:00
parent e0f1ed950b
commit 4e845408e3
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0

View File

@ -72,7 +72,7 @@ public class SimpleOptionParser implements OptionParser {
break; break;
} }
} }
if (i + argLength < args.length) { if (i + argLength <= args.length) {
return parser.apply(searcher, Arrays.copyOfRange(args, i, i + argLength)); return parser.apply(searcher, Arrays.copyOfRange(args, i, i + argLength));
} }
break; break;