diff options
author | Timo Sirainen <cras@irssi.org> | 2002-03-09 17:54:38 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-03-09 17:54:38 +0000 |
commit | 95d8b617ae223980cf5944588881d0a35736981e (patch) | |
tree | d3644aa1408356a4ba73ba8331f451b35a615dcf /src/fe-text | |
parent | 34e5a316738976d31cb1fa1c073d1ecd261b685f (diff) | |
download | irssi-95d8b617ae223980cf5944588881d0a35736981e.zip |
Irssi didn't work properly if read() returned only partial utf8 character
string.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2544 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/term-terminfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 43d11375..30f7d11b 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -630,9 +630,9 @@ int term_gets(unichar *buffer, int size) if (i >= term_inbuf_pos) term_inbuf_pos = 0; - else { + else if (i > 0) { memmove(term_inbuf+i, term_inbuf, term_inbuf_pos-i); - term_inbuf_pos = i; + term_inbuf_pos -= i; } } |