# HG changeset patch # User Richard M. Stallman # Date 1035672756 0 # Node ID 7ac7ca5ac550947cfe3d00d5e54626a06f28f769 # Parent ed648a134b7e70f112b24a8b73ed030c56b3b2f7 (Fformat): Detect invalid format letters for floats. diff -r ed648a134b7e -r 7ac7ca5ac550 src/editfns.c --- a/src/editfns.c Sat Oct 26 22:49:46 2002 +0000 +++ b/src/editfns.c Sat Oct 26 22:52:36 2002 +0000 @@ -3259,7 +3259,12 @@ else if (FLOATP (args[n]) && *format != 's') { if (! (*format == 'e' || *format == 'f' || *format == 'g')) - args[n] = Ftruncate (args[n], Qnil); + { + if (*format != 'd' && *format != 'o' && *format != 'x' + && *format != 'i' && *format != 'X' && *format != 'c') + error ("Invalid format operation %%%c", *format); + args[n] = Ftruncate (args[n], Qnil); + } /* Note that we're using sprintf to print floats, so we have to take into account what that function