From b1f691f2deb0b59c6e237241e1995c5d95f37ffa Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Thu, 17 Aug 2017 15:27:52 -0400 Subject: Introduce ftoa() as a replacement for the %g format specifier Not all platforms support printing floats, this is a more portable (if uglier) way. --- midend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'midend.c') diff --git a/midend.c b/midend.c index 15636d4..f2d27d3 100644 --- a/midend.c +++ b/midend.c @@ -2049,7 +2049,7 @@ void midend_serialise(midend *me, */ if (me->ourgame->is_timed) { char buf[80]; - sprintf(buf, "%g", me->elapsed); + ftoa(buf, me->elapsed); wr("TIME", buf); } -- cgit v1.1