From f33c164123e2bc46c4d06853b1a32130126d54c8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 27 Aug 2015 04:09:11 -0700 Subject: [PATCH] =?utf8?q?Fix=20=E2=80=98format=E2=80=99=20bug=20with=20pr?= =?utf8?q?operty=20offsets?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/editfns.c (styled_format): Fix recently-introduced ‘format’ bug in calculating string property offsets (Bug#21351). --- src/editfns.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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)) -- 2.39.5