[SV #38945] Copy the entire buffer back when overwriting CR

This commit is contained in:
Paul Smith
2013-05-26 14:41:45 -04:00
parent 2fc0f614be
commit c11024b3b3
4 changed files with 12 additions and 3 deletions

2
read.c
View File

@@ -2542,7 +2542,7 @@ readline (struct ebuffer *ebuf)
if ((p - start) > 1 && p[-2] == '\r')
{
--p;
p[-1] = '\n';
memmove (p-1, p, strlen (p) + 1);
}
#endif