We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf24462 + 0660aee commit 2af2331Copy full SHA for 2af2331
chat.cpp
@@ -1035,7 +1035,7 @@ int main(int argc, char ** argv) {
1035
if(params.use_color) printf(ANSI_BOLD ANSI_COLOR_GREEN);
1036
if (scanf("%255[^\n]%n%*c", buf, &n_read) <= 0) {
1037
// presumable empty line, consume the newline
1038
- scanf("%*c");
+ if (scanf("%*c") <= 0) { /*ignore*/ }
1039
n_read=0;
1040
}
1041
if(params.use_color) printf(ANSI_COLOR_RESET);
0 commit comments