Skip to content

Commit

Permalink
Merge pull request #3 from bigattichouse/master
Browse files Browse the repository at this point in the history
process the scanf() output so Ubuntu 22 compiler doesn't error due to…
  • Loading branch information
antimatter15 authored Mar 17, 2023
2 parents bf24462 + 0660aee commit 2af2331
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,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
scanf("%*c");
if (scanf("%*c") <= 0) { /*ignore*/ }
n_read=0;
}
if(params.use_color) printf(ANSI_COLOR_RESET);
Expand Down

0 comments on commit 2af2331

Please sign in to comment.