1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added check on input length

This commit is contained in:
James Booth 2014-04-02 22:19:27 +01:00
parent a720ef2627
commit e083e20313

View File

@ -142,6 +142,10 @@ _inp_get_char(char *input, int *size)
// if it wasn't an arrow key etc
if (!_handle_edit(result, ch, input, size)) {
if (_printable(ch) && result != KEY_CODE_YES) {
if (*size >= INP_WIN_MAX) {
return ERR;
}
inp_x = getcurx(inp_win);
// handle insert if not at end of input