Resolve issue #96 where if "nothing" was first input then program not terminated#137
Resolve issue #96 where if "nothing" was first input then program not terminated#137bdtran2002 wants to merge 1 commit intoChicoState:mainfrom
Conversation
…gram not terminated
There was a problem hiding this comment.
Pull request overview
Fixes issue #96 by ensuring the app quits when the first user input is nothing, preventing the extra “Let’s listen to more” + follow-up prompt seen in the bug report.
Changes:
- Adds an early-exit check immediately after the first
get_input_in_lowercase()call. - Minor formatting/line-ending adjustment near the end of the file.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (input == "nothing"){ | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
This early return fixes the first-prompt case, but entering "nothing" on later prompts still prints a validation message (because the loop prints before the while (input != "nothing") check). To match issue #96 (“terminate without any more interaction”), check for "nothing" immediately after each get_input_in_lowercase() (inside the loop as well) and exit/break before picking/printing a response.
| if (input == "nothing"){ | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
Indentation in this newly added block uses tabs/misaligned spacing, while the rest of the file uses consistent two-space indentation. Please reformat this block to match the surrounding style to avoid noisy diffs and keep formatting consistent.
| if (input == "nothing"){ | |
| return 0; | |
| } | |
| if (input == "nothing"){ | |
| return 0; | |
| } |
|
*accidentally closed this PR |
Resolves issue #96