Update main.cpp

This commit is contained in:
Justin Suess 2023-03-16 12:45:24 -04:00 committed by GitHub
parent a4fb5a9719
commit 9f90347596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1003,7 +1003,7 @@ int main(int argc, char ** argv) {
if(params.use_color) printf(ANSI_BOLD ANSI_COLOR_GREEN);
if (scanf("%255[^\n]%n%*c", buf, &n_read) <= 0) {
// presumable empty line, consume the newline
std::ignore = scanf("%*c");
std::ignore = scanf("%*c");
n_read=0;
}
if(params.use_color) printf(ANSI_COLOR_RESET);