From: Paul Eggert Date: Wed, 31 May 2017 23:50:08 +0000 (-0700) Subject: Fix bug with "%%" in error format X-Git-Tag: emacs-26.0.90~521^2~208 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=32fd8768093e21f1e812548d27c0bfd70cd82f78;p=emacs.git Fix bug with "%%" in error format * src/doprnt.c (doprnt): Format "%%" correctly. Problem reported by Philipp Stephani in: http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00901.html --- diff --git a/src/doprnt.c b/src/doprnt.c index bed9350f4a6..418601acb02 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -438,7 +438,9 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format, } case '%': - fmt--; /* Drop thru and this % will be treated as normal */ + /* Treat this '%' as normal. */ + fmt0 = fmt - 1; + break; } }