Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1041,10 +1041,10 @@ int main(int argc, char ** argv) {
bool another_line=true;
while (another_line) {
fflush(stdout);
char buf[256] = {0};
char buf[16384] = { 0 };
int n_read;
if(params.use_color) printf(ANSI_BOLD ANSI_COLOR_GREEN);
if (scanf("%255[^\n]%n%*c", buf, &n_read) <= 0) {
if (params.use_color) printf(ANSI_BOLD ANSI_COLOR_GREEN);
if (scanf("%16383[^\n]%n%*c", buf, &n_read) <= 0) {
// presumable empty line, consume the newline
if (scanf("%*c") <= 0) { /*ignore*/ }
n_read=0;
Expand Down