Mercurial > emacs
changeset 59382:e25d041a3a6e
(encode_terminal_code): Fix buffer size computation.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 06 Jan 2005 00:47:50 +0000 |
parents | 77618102ddc4 |
children | b2ee40a51736 |
files | src/term.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/term.c Wed Jan 05 21:49:02 2005 +0000 +++ b/src/term.c Thu Jan 06 00:47:50 2005 +0000 @@ -1,5 +1,5 @@ /* Terminal control module for terminals described by TERMCAP - Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001, 2002 + Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -869,7 +869,7 @@ if (! STRING_MULTIBYTE (string)) string = string_to_multibyte (string); nbytes = buf - encode_terminal_buf; - if (nbytes + SBYTES (string) < encode_terminal_bufsize) + if (encode_terminal_bufsize < nbytes + SBYTES (string)) { encode_terminal_bufsize = nbytes + SBYTES (string); encode_terminal_buf = xrealloc (encode_terminal_buf,