diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-13 19:39:01 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-13 19:39:01 +0000 |
commit | 2300537c79dd642a7187018334a1a697a415f589 (patch) | |
tree | 9ec46fd001e477f685a317539ce746dfc7c43c7f /stm | |
parent | 3f5e1b3e2f96f775d292f2d1c2c8ca3ac257e369 (diff) | |
download | micropython-2300537c79dd642a7187018334a1a697a415f589.tar.gz micropython-2300537c79dd642a7187018334a1a697a415f589.zip |
Cleanup built-ins, and fix some compiler warnings/errors.
Diffstat (limited to 'stm')
-rw-r--r-- | stm/printf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stm/printf.c b/stm/printf.c index c0fa82e1b0..732e834526 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); |