From: Paul Eggert Date: Thu, 27 Aug 2015 11:09:11 +0000 (-0700) Subject: Fix ‘format’ bug with property offsets X-Git-Tag: emacs-25.0.90~1236 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f33c164123e2bc46c4d06853b1a32130126d54c8;p=emacs.git Fix ‘format’ bug with property offsets * src/editfns.c (styled_format): Fix recently-introduced ‘format’ bug in calculating string property offsets (Bug#21351). --- diff --git a/src/editfns.c b/src/editfns.c index 9db4d9328a0..bbb139f2980 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))