patch 8.1.0491: if a terminal dump has CR it is considered corrupt

Problem:    If a terminal dump has CR it is considered corrupt.
Solution:   Ignore CR characters. (Nobuhiro Takasaki, closes #3558)
diff --git a/src/terminal.c b/src/terminal.c
index 4e62253..6927d69 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -4094,7 +4094,12 @@
     {
 	if (c == EOF)
 	    break;
-	if (c == '\n')
+	if (c == '\r')
+	{
+	    // DOS line endings?  Ignore.
+	    c = fgetc(fd);
+	}
+	else if (c == '\n')
 	{
 	    /* End of a line: append it to the buffer. */
 	    if (ga_text.ga_data == NULL)