]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fformat): Properly print floats.
authorRichard M. Stallman <rms@gnu.org>
Tue, 17 Mar 1998 08:16:35 +0000 (08:16 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 17 Mar 1998 08:16:35 +0000 (08:16 +0000)
src/editfns.c

index 587e751efc762c04954807595c9d3f5c13b975ed..f25b6aa8f3489dd61064f519b0504946f4bcf98b 100644 (file)
@@ -2424,7 +2424,10 @@ Use %% to put a single % into the output.")
                     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;