From c99205b512023e0a578767e6c723c87f81e03f4f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 19 Dec 2001 15:25:16 +0000 Subject: [PATCH] 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 --- src/fe-text/gui-entry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 77cd0f02..3ba30f90 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -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);