From cf7edc2a6ea95e0acc574c5364bf6f729b53e492 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 15 Sep 2011 18:56:07 +0200 Subject: [PATCH] * src/editfns.c (Fformat): Correctly handle text properties on "%%". --- src/ChangeLog | 4 ++++ src/editfns.c | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 22f69d4a9bb..2fb47805082 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-09-15 Andreas Schwab + + * editfns.c (Fformat): Correctly handle text properties on "%%". + 2011-09-15 Eli Zaretskii * xterm.c (x_draw_composite_glyph_string_foreground): diff --git a/src/editfns.c b/src/editfns.c index f62efc30790..fb9ef7a5b9f 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3721,7 +3721,11 @@ usage: (format STRING &rest OBJECTS) */) memset (&discarded[format0 - format_start], 1, format - format0); conversion = *format; if (conversion == '%') - goto copy_char; + { + format0++; + nchars++; + goto copy_char; + } discarded[format - format_start] = 1; format++; @@ -4138,8 +4142,7 @@ usage: (format STRING &rest OBJECTS) */) while (! CHAR_HEAD_P (*format)); convbytes = format - src; - memset (&discarded[format0 + 1 - format_start], 2, - format - (format0 + 1)); + memset (&discarded[format0 + 1 - format_start], 2, convbytes - 1); } else { -- 2.39.2