mirror of
https://github.com/irssi/irssi.git
synced 2026-08-21 01:22:26 +02: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:
parent
080b491db9
commit
c99205b512
1 changed files with 2 additions and 2 deletions
|
|
@ -245,8 +245,8 @@ void gui_entry_insert_char(GUI_ENTRY_REC *entry, char chr)
|
||||||
{
|
{
|
||||||
g_return_if_fail(entry != NULL);
|
g_return_if_fail(entry != NULL);
|
||||||
|
|
||||||
if (chr == 0)
|
if (chr == 0 || chr == 13 || chr == 10)
|
||||||
return; /* never insert NUL characters */
|
return; /* never insert NUL, CR or LF characters */
|
||||||
|
|
||||||
gui_entry_redraw_from(entry, entry->pos);
|
gui_entry_redraw_from(entry, entry->pos);
|
||||||
g_string_insert_c(entry->text, entry->pos, chr);
|
g_string_insert_c(entry->text, entry->pos, chr);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue