From: Richard M. Stallman Date: Tue, 17 Mar 1998 08:16:35 +0000 (+0000) Subject: (Fformat): Properly print floats. X-Git-Tag: emacs-20.3~1872 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0183d383dd62db96c42e3ee27d308f39afffa22;p=emacs.git (Fformat): Properly print floats. --- diff --git a/src/editfns.c b/src/editfns.c index 587e751efc7..f25b6aa8f34 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -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;