From 9e63b4a53403840acf3d759d8ac16475c12562e2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Apr 2013 21:21:01 +0300 Subject: Fix bug #14287 with decoding EOL by *-dos coding systems. src/coding.c (decode_coding_gap): Don't remove the character before a newline unless it's a CR character. --- src/coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index b9fb92c481b..f6664e179b7 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7774,7 +7774,7 @@ decode_coding_gap (struct coding_system *coding, while (src_beg < src) { *--dst = *--src; - if (*src == '\n') + if (*src == '\n' && src > src_beg && src[-1] == '\r') src--; } diff = dst - src; -- cgit v1.2.1