(to_multibyte): Fix computation of new read_buffer_size.

This commit is contained in:
Gerd Moellmann 2001-10-31 13:33:56 +00:00
parent dd387b25cd
commit fe957e6553
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,7 @@
2001-10-31 Gerd Moellmann <gerd@gnu.org>
* lread.c (to_multibyte): Fix computation of new read_buffer_size.
* xfaces.c (realize_x_face): If C is not a single-byte character,
set the face's colors_copied_bitwise_p instead of the defaulted_p
members which have a different meaning.

View file

@ -1793,7 +1793,7 @@ to_multibyte (p, end, nchars)
if (read_buffer_size < 2 * nbytes)
{
int offset = *p - read_buffer;
read_buffer_size *= 2;
read_buffer_size = 2 * max (read_buffer_size, nbytes);
read_buffer = (char *) xrealloc (read_buffer, read_buffer_size);
*p = read_buffer + offset;
*end = read_buffer + read_buffer_size;