changeset 40558:0f4185c9842a

(to_multibyte): Fix computation of new read_buffer_size.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 31 Oct 2001 13:33:36 +0000
parents 31cdfb3f6686
children 554c6e9eef8a
files src/lread.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Wed Oct 31 11:12:09 2001 +0000
+++ b/src/lread.c	Wed Oct 31 13:33:36 2001 +0000
@@ -1793,7 +1793,7 @@
   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;