Skip to content

Commit

Permalink
Fix bug on delete command
Browse files Browse the repository at this point in the history
  • Loading branch information
QianChangru committed Sep 9, 2023
1 parent 1f284c9 commit 92e988c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions data/tasks.txt
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
T | 0 | hi
D | 0 | hii | Jan 01 2109
2 changes: 1 addition & 1 deletion src/main/java/TaskList.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void addTask(Task t) {
}

public void deleteTask(int num) {
Task re = tasks.remove(num - 1);
Task re = tasks.remove(num);
this.storage.rewriteFile(tasks);
Ui.deleteTask(re, tasks);
}
Expand Down

0 comments on commit 92e988c

Please sign in to comment.