changeset 6992:ed57331fb222

(readline): Fix updating of p when buffer grows.
author Richard M. Stallman <rms@gnu.org>
date Wed, 20 Apr 1994 20:04:20 +0000
parents 72393aa69dd2
children 0983fe01e614
files lib-src/fakemail.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/fakemail.c	Wed Apr 20 19:56:46 1994 +0000
+++ b/lib-src/fakemail.c	Wed Apr 20 20:04:20 1994 +0000
@@ -216,7 +216,7 @@
 	{
 	  linebuffer->size *= 2;
 	  buffer = ((char *) xrealloc (buffer, linebuffer->size));
-	  p += buffer - linebuffer->buffer;
+	  p = buffer + (p - linebuffer->buffer);
 	  end = buffer + linebuffer->size;
 	  linebuffer->buffer = buffer;
 	}