emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105791: * editfns.c (Fformat): Fix b


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105791: * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
Date: Thu, 15 Sep 2011 11:11:37 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105791
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2011-09-15 11:11:37 -0700
message:
  * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
  
  Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
modified:
  src/ChangeLog
  src/editfns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-09-15 17:41:25 +0000
+++ b/src/ChangeLog     2011-09-15 18:11:37 +0000
@@ -1,3 +1,8 @@
+2011-09-15  Paul Eggert  <address@hidden>
+
+       * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
+       Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
+
 2011-09-15  Andreas Schwab  <address@hidden>
 
        * editfns.c (Fformat): Correctly handle text properties on "%%".

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2011-09-15 16:56:07 +0000
+++ b/src/editfns.c     2011-09-15 18:11:37 +0000
@@ -3721,11 +3721,7 @@
          memset (&discarded[format0 - format_start], 1, format - format0);
          conversion = *format;
          if (conversion == '%')
-           {
-             format0++;
-             nchars++;
-             goto copy_char;
-           }
+           goto copy_char;
          discarded[format - format_start] = 1;
          format++;
 
@@ -4142,7 +4138,7 @@
              while (! CHAR_HEAD_P (*format));
 
              convbytes = format - src;
-             memset (&discarded[format0 + 1 - format_start], 2, convbytes - 1);
+             memset (&discarded[src + 1 - format_start], 2, convbytes - 1);
            }
          else
            {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]