mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
(encode_terminal_code): Fix buffer size computation.
This commit is contained in:
parent
9890ec7d19
commit
fd4a9f8fae
@ -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 @@ encode_terminal_code (src, src_len, coding)
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user