changeset 23326:df3f641c9ca1

(Fformat): Check format control characters.
author Kenichi Handa <handa@m17n.org>
date Sat, 26 Sep 1998 04:20:48 +0000
parents bbd06336cd0c
children 8875c38b22c7
files src/editfns.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Sat Sep 26 04:20:48 1998 +0000
+++ b/src/editfns.c	Sat Sep 26 04:20:48 1998 +0000
@@ -2551,7 +2551,12 @@
 	       be a double.  */
 	    if (*format == 'e' || *format == 'f' || *format == 'g')
 	      args[n] = Ffloat (args[n]);
+	    else
 #endif
+	      if (*format != 'd' && *format != 'o' && *format != 'x'
+		  && *format != 'X' && *format != 'c')
+		error ("Invalid format operation %%%c", *format);
+
 	    thissize = 30;	
 	    if (*format == 'c'
 		&& (! SINGLE_BYTE_CHAR_P (XINT (args[n]))