]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug with "%%" in error format
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 May 2017 23:50:08 +0000 (16:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 May 2017 23:50:24 +0000 (16:50 -0700)
* src/doprnt.c (doprnt): Format "%%" correctly.
Problem reported by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00901.html

src/doprnt.c

index bed9350f4a6d6e26ffe82cd0691c7c4fae80bdb1..418601acb025d06910c529e657c7bf564e39f692 100644 (file)
@@ -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;
            }
        }