From: Richard M. Stallman Date: Fri, 23 Sep 2005 18:22:46 +0000 (+0000) Subject: (Fformat): Explicitly test for end of format string and don't use `index'. X-Git-Tag: emacs-pretest-22.0.90~6977 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=913f73d4ee958218c5ce3b5a3957bee4f844f124;p=emacs.git (Fformat): Explicitly test for end of format string and don't use `index'. --- diff --git a/src/editfns.c b/src/editfns.c index c8b02570c12..ee1249acc11 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3424,7 +3424,9 @@ usage: (format STRING &rest OBJECTS) */) 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')