Skip to content

Commit

Permalink
Don't continue reading std::cin if it's in a fail state
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmz committed Nov 20, 2023
1 parent 7a19ef7 commit 891d05f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/testapp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void debug_cli_loop()

std::string command;

while(true)
while(std::cin)
{
std::cout << "> ";
std::cin >> command;
Expand Down

0 comments on commit 891d05f

Please sign in to comment.