From: Eli Zaretskii Date: Sun, 28 Apr 2013 18:21:01 +0000 (+0300) Subject: Fix bug #14287 with decoding EOL by *-dos coding systems. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9e63b4a53403840acf3d759d8ac16475c12562e2;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5fa2404a243..2e9e19fd547 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-04-28 Eli Zaretskii + + * coding.c (decode_coding_gap): Don't remove the character before + a newline unless it's a CR character. (Bug#14287) + 2013-04-28 Dan Nicolaescu * dispextern.h (struct face): Move enum face_underline_type 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;