Commit 1ddb6978 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(readline): When extending the buffer,

calculate end afresh using the new size.
parent d8ec2bc8
......@@ -217,7 +217,7 @@ readline (linebuffer, stream)
linebuffer->size *= 2;
buffer = ((char *) xrealloc (buffer, linebuffer->size));
p += buffer - linebuffer->buffer;
end += buffer - linebuffer->buffer;
end = buffer + linebuffer->size;
linebuffer->buffer = buffer;
}
if (c < 0 || c == '\n')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment