diff options
author | John R. Lenton <jlenton@gmail.com> | 2014-01-13 23:14:35 +0000 |
---|---|---|
committer | John R. Lenton <jlenton@gmail.com> | 2014-01-13 23:14:35 +0000 |
commit | 93451002f04e0b89e41e1faa82f86e937bb219f1 (patch) | |
tree | 478f8fedae2b08f12181c98a4a3d1c4cdf19403d /stm/printf.c | |
parent | 88cb1e60e0b780d71e9c2d7b0acafa71ba3ea318 (diff) | |
parent | ca318bba0d97c66d8fb14a089d8fa269a0e1b424 (diff) | |
download | micropython-93451002f04e0b89e41e1faa82f86e937bb219f1.tar.gz micropython-93451002f04e0b89e41e1faa82f86e937bb219f1.zip |
Merge remote-tracking branch 'upstream/master' into builtins
Conflicts:
py/builtin.c
py/builtin.h
py/runtime.c
Diffstat (limited to 'stm/printf.c')
-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); |