diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-05-31 16:50:08 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-05-31 16:50:24 -0700 |
commit | 32fd8768093e21f1e812548d27c0bfd70cd82f78 (patch) | |
tree | 5103630bc88856378258858d113d05fa90822f22 /src/doprnt.c | |
parent | 9c748b27c066b0cfdc8ff4a4e0fd545162836d06 (diff) | |
download | emacs-32fd8768093e21f1e812548d27c0bfd70cd82f78.tar.gz emacs-32fd8768093e21f1e812548d27c0bfd70cd82f78.tar.bz2 emacs-32fd8768093e21f1e812548d27c0bfd70cd82f78.zip |
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
Diffstat (limited to 'src/doprnt.c')
-rw-r--r-- | src/doprnt.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } } |