emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master f33c164: Fix ‘format’ bug with property offsets


From: Paul Eggert
Subject: [Emacs-diffs] master f33c164: Fix ‘format’ bug with property offsets
Date: Thu, 27 Aug 2015 11:09:41 +0000

branch: master
commit f33c164123e2bc46c4d06853b1a32130126d54c8
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Fix ‘format’ bug with property offsets
    
    * src/editfns.c (styled_format): Fix recently-introduced ‘format’
    bug in calculating string property offsets (Bug#21351).
---
 src/editfns.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/editfns.c b/src/editfns.c
index 9db4d93..bbb139f 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4013,10 +4013,14 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool 
message)
            error ("Format string ends in middle of format specifier");
 
          memset (&discarded[format0 - format_start], 1, format - format0);
-         conversion = *format++;
+         conversion = *format;
          if (conversion == '%')
-           goto copy_char;
+           {
+             format++;
+             goto copy_char;
+           }
          discarded[format - format_start] = 1;
+         format++;
 
          ++n;
          if (! (n < nargs))



reply via email to

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