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
This commit is contained in:
Paul Eggert 2017-05-31 16:50:08 -07:00
parent 9c748b27c0
commit 32fd876809

View 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;
}
}