]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #14287 with decoding EOL by *-dos coding systems.
authorEli Zaretskii <eliz@gnu.org>
Sun, 28 Apr 2013 18:21:01 +0000 (21:21 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 28 Apr 2013 18:21:01 +0000 (21:21 +0300)
 src/coding.c (decode_coding_gap): Don't remove the character before
 a newline unless it's a CR character.

src/ChangeLog
src/coding.c

index 5fa2404a243f788245f4d9b38ef69d59c7359f78..2e9e19fd54750867332c9f2c29fcc070a4663d8b 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-28  Eli Zaretskii  <eliz@gnu.org>
+
+       * 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  <dann@gnu.org>
 
        * dispextern.h (struct face): Move enum face_underline_type
index b9fb92c481b33e4d13657cc9755530b8aa876174..f6664e179b7271295e2a24171c565c8d2d2e67b2 100644 (file)
@@ -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;