changeset 21202:ef954087e7b9

(Fformat): Properly print floats.
author Richard M. Stallman <rms@gnu.org>
date Tue, 17 Mar 1998 08:16:35 +0000
parents 425bf2edf1d4
children 889e8341a01d
files src/editfns.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Tue Mar 17 08:14:28 1998 +0000
+++ b/src/editfns.c	Tue Mar 17 08:16:35 1998 +0000
@@ -2424,7 +2424,10 @@
 		     format - this_format_start);
 	      this_format[format - this_format_start] = 0;
 
-	      sprintf (p, this_format, XINT (args[n]));
+	      if (INTEGERP (args[n]))
+		sprintf (p, this_format, XINT (args[n]));
+	      else
+		sprintf (p, this_format, XFLOAT (args[n])->data);
 
 	      this_nchars = strlen (p);
 	      p += this_nchars;