Skip to content

Commit

Permalink
Fix leave bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nixonwidjaja committed Nov 13, 2023
1 parent 913403c commit 6bc4f16
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private String parseLeave(String arg) throws ParseException {
StringBuilder months = new StringBuilder(Leave.NO_LEAVE);
String[] args = arg.split(",");
for (int i = 0; i < args.length; i++) {
if (args[i].length() > 3) {
if (args[i].length() <= 0 || args[i].length() > 3) {
throw new ParseException(LeaveCommand.MESSAGE_INVALID_MONTH + LeaveCommand.MESSAGE_USAGE);
}
try {
Expand Down

0 comments on commit 6bc4f16

Please sign in to comment.