aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaid Belhadj <71043286+Said-Belhadj@users.noreply.github.com>2021-06-25 20:15:06 +0200
committerGitHub <noreply@github.com>2021-06-25 20:15:06 +0200
commitf920b48762cae194d5a9f7808273826714166424 (patch)
tree241fc9d0cfbfee93d345af198f71db45d0e4bd08
parentb0429d97568a66266d77cbcc5da712352791af25 (diff)
parentc61ce2e94a1be121414670f93987abdd29d389c6 (diff)
downloadSpoteezer-f920b48762cae194d5a9f7808273826714166424.tar.gz
Spoteezer-f920b48762cae194d5a9f7808273826714166424.tar.bz2
Spoteezer-f920b48762cae194d5a9f7808273826714166424.zip
Merge pull request #2 from Said-Belhadj/hotfix/STZ-0004
Fixing STZ-0004 issue.
-rw-r--r--src/musichub/main/Main.java4
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();
.git/commit/README.md?id=c1fd5cb718cab2fb6c5c910cf40be0628871d13e&follow=1'>Update README.mdClyhtsuriva1-1/+8 2020-05-19Update README.mdClyhtsuriva1-0/+5 2020-05-19ATS-Project -> ATSChatChimi3-7/+7 2020-05-19Update README.mdClyhtsuriva1-14/+4 2020-05-19Update script.shLuneji1-15/+15 2020-05-19Update script.shLuneji1-1/+1 2020-05-19Update script.shLuneji1-0/+2