1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

Never allow adding CR or LF characters to input line, they could mess up everything.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2270 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-12-19 15:25:16 +00:00 committed by cras
parent 080b491db9
commit c99205b512

View File

@ -245,8 +245,8 @@ void gui_entry_insert_char(GUI_ENTRY_REC *entry, char chr)
{
g_return_if_fail(entry != NULL);
if (chr == 0)
return; /* never insert NUL characters */
if (chr == 0 || chr == 13 || chr == 10)
return; /* never insert NUL, CR or LF characters */
gui_entry_redraw_from(entry, entry->pos);
g_string_insert_c(entry->text, entry->pos, chr);