]> code.delx.au - gnu-emacs/commitdiff
(Fformat): Explicitly test for end of format string and don't use `index'.
authorRichard M. Stallman <rms@gnu.org>
Fri, 23 Sep 2005 18:22:46 +0000 (18:22 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 23 Sep 2005 18:22:46 +0000 (18:22 +0000)
src/editfns.c

index c8b02570c12baead096351ed44fdee9436e0aefc..ee1249acc118c92fa39a7412d2b961970f75cbd6 100644 (file)
@@ -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')