diff options
author | Said Belhadj <71043286+Said-Belhadj@users.noreply.github.com> | 2021-06-25 20:15:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 20:15:06 +0200 |
commit | f920b48762cae194d5a9f7808273826714166424 (patch) | |
tree | 241fc9d0cfbfee93d345af198f71db45d0e4bd08 /src | |
parent | b0429d97568a66266d77cbcc5da712352791af25 (diff) | |
parent | c61ce2e94a1be121414670f93987abdd29d389c6 (diff) |
Merge pull request #2 from Said-Belhadj/hotfix/STZ-0004
Fixing STZ-0004 issue.
Diffstat (limited to 'src')
-rw-r--r-- | src/musichub/main/Main.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/musichub/main/Main.java b/src/musichub/main/Main.java index f917b01..b72a95b 100644 --- a/src/musichub/main/Main.java +++ b/src/musichub/main/Main.java @@ -20,8 +20,10 @@ public class Main { if (choice.length() == 0) System.exit(0); - while (choice.charAt(0) != 'q') { + while (!choice.equals("")) { //if the user puts nothing, quit the loop/system switch (choice.charAt(0)) { + case 'q': //added the option directly in the switch instead of the loop + System.exit(0); case 'h': printAvailableCommands(); choice = scan.nextLine(); |