mirror of
https://github.com/profanity-im/profanity.git
synced 2025-07-26 12:14:28 -04:00
Moved string termination out of main loop
This commit is contained in:
parent
aec1484806
commit
40f91de7a3
@ -116,7 +116,6 @@ prof_run(const int disable_tls, char *log_level, char *account_name)
|
|||||||
ui_update();
|
ui_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
inp[size++] = '\0';
|
|
||||||
cmd_result = process_input(inp);
|
cmd_result = process_input(inp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,6 +193,10 @@ ui_get_char(char *input, int *size)
|
|||||||
ui_input_nonblocking(FALSE);
|
ui_input_nonblocking(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ch == '\n') {
|
||||||
|
input[*size++] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
return (ch != '\n');
|
return (ch != '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user