From d0183d383dd62db96c42e3ee27d308f39afffa22 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 17 Mar 1998 08:16:35 +0000 Subject: [PATCH] (Fformat): Properly print floats. --- src/editfns.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.5