diff src/editfns.c @ 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 1da51a6b68c6
children 83ce839858fb ee12d75eb214
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')