summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-12-19 15:25:16 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-12-19 15:25:16 +0000
commitc99205b512023e0a578767e6c723c87f81e03f4f (patch)
treed74fc6fabba2fec11bd90e0b20af1391a4482aed /src
parent080b491db93380f4a82489054427628248ff8b3c (diff)
downloadirssi-c99205b512023e0a578767e6c723c87f81e03f4f.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/fe-text/gui-entry.c4
1 files 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);