# HG changeset patch # User Kim F. Storm # Date 1127117594 0 # Node ID 1da51a6b68c6ab3e0c72b3945d0d8c5a4fdbcda4 # Parent e6815cb0350c9c140cae419f2d2737754e518057 (Fformat): Don't scan past end of format string that ends in %. Reported by: Johan Bockgrd. diff -r e6815cb0350c -r 1da51a6b68c6 src/editfns.c --- a/src/editfns.c Mon Sep 19 08:13:02 2005 +0000 +++ b/src/editfns.c Mon Sep 19 08:13:14 2005 +0000 @@ -3424,7 +3424,7 @@ digits to print after the '.' for floats, or the max. number of chars to print from a string. */ - while (index ("-0# ", *format)) + while (*format && index ("-0# ", *format)) ++format; if (*format >= '0' && *format <= '9')