Mercurial > emacs
changeset 65659:71ea8ba70056
(Fformat): Explicitly test for end of format string and don't use `index'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 23 Sep 2005 18:22:46 +0000 |
parents | 5bde6d4759d6 |
children | fbd8e85ce811 |
files | src/editfns.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/editfns.c Fri Sep 23 18:15:20 2005 +0000 +++ b/src/editfns.c Fri Sep 23 18:22:46 2005 +0000 @@ -3424,7 +3424,9 @@ digits to print after the '.' for floats, or the max. number of chars to print from a string. */ - while (*format && index ("-0# ", *format)) + while (format != end + && (*format == '-' || *format == '0' || *format == '#' + || * format == ' ')) ++format; if (*format >= '0' && *format <= '9')