aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2005-01-06 00:47:50 +0000
committerKenichi Handa2005-01-06 00:47:50 +0000
commitfd4a9f8fae010f4f3d86f59f6427be31940991e5 (patch)
tree247e528c8500affa6067d612080fec127fb71c25 /src
parent9890ec7d19285475a18f191a695eaf4cd90ba6a3 (diff)
downloademacs-fd4a9f8fae010f4f3d86f59f6427be31940991e5.tar.gz
emacs-fd4a9f8fae010f4f3d86f59f6427be31940991e5.zip
(encode_terminal_code): Fix buffer size computation.
Diffstat (limited to 'src')
-rw-r--r--src/term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c
index 4164a3bc0d3..23da2ac8704 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1,5 +1,5 @@
1/* Terminal control module for terminals described by TERMCAP 1/* Terminal control module for terminals described by TERMCAP
2 Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001, 2002 2 Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001, 2002, 2005
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -869,7 +869,7 @@ encode_terminal_code (src, src_len, coding)
869 if (! STRING_MULTIBYTE (string)) 869 if (! STRING_MULTIBYTE (string))
870 string = string_to_multibyte (string); 870 string = string_to_multibyte (string);
871 nbytes = buf - encode_terminal_buf; 871 nbytes = buf - encode_terminal_buf;
872 if (nbytes + SBYTES (string) < encode_terminal_bufsize) 872 if (encode_terminal_bufsize < nbytes + SBYTES (string))
873 { 873 {
874 encode_terminal_bufsize = nbytes + SBYTES (string); 874 encode_terminal_bufsize = nbytes + SBYTES (string);
875 encode_terminal_buf = xrealloc (encode_terminal_buf, 875 encode_terminal_buf = xrealloc (encode_terminal_buf,