From 2300537c79dd642a7187018334a1a697a415f589 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 13 Jan 2014 19:39:01 +0000 Subject: Cleanup built-ins, and fix some compiler warnings/errors. --- stm/printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stm/printf.c') diff --git a/stm/printf.c b/stm/printf.c index c0fa82e1b..732e83452 100644 --- a/stm/printf.c +++ b/stm/printf.c @@ -213,9 +213,9 @@ int pfenv_printf(const pfenv_t *pfenv, const char *fmt, va_list args) { // usable. I expect that this will be replaced with something // more appropriate. char dot = '.'; - double d = va_arg(args, double); + mp_float_t d = va_arg(args, double); int left = (int)d; - int right = (int)((d - (double)(int)d) * 1000000.0); + int right = (int)((d - (mp_float_t)(int)d) * 1000000.0); chrs += pfenv_print_int(pfenv, left, 1, 10, 'a', flags, width); chrs += pfenv_print_strn(pfenv, &dot, 1, flags, width); chrs += pfenv_print_int(pfenv, right, 0, 10, 'a', PF_FLAG_ZERO_PAD, 6); -- cgit v1.2.3