diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-09-29 14:30:41 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-09-29 14:30:41 +0900 |
| commit | a1886942eb82869305163975a2ba053e852e2292 (patch) | |
| tree | 9758a6c603ff1032d78ff14dba692618df070c31 /mrbgems/mruby-sprintf | |
| parent | c5d500d51e6620aca0903bfa391bb7e5134aa317 (diff) | |
| download | mruby-a1886942eb82869305163975a2ba053e852e2292.tar.gz mruby-a1886942eb82869305163975a2ba053e852e2292.zip | |
Further refactoring over #4738
Diffstat (limited to 'mrbgems/mruby-sprintf')
| -rw-r--r-- | mrbgems/mruby-sprintf/src/sprintf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c index 16ced6a85..6e4d8fd7e 100644 --- a/mrbgems/mruby-sprintf/src/sprintf.c +++ b/mrbgems/mruby-sprintf/src/sprintf.c @@ -1004,10 +1004,8 @@ retry: case 'A': { mrb_value val = GETARG(); double fval; - mrb_int i; mrb_int need = 6; char fbuf[32]; - int frexp_result; fval = mrb_float(mrb_Float(mrb, val)); if (!isfinite(fval)) { @@ -1051,8 +1049,8 @@ retry: fmt_setup(fbuf, sizeof(fbuf), *p, flags, width, prec); need = 0; if (*p != 'e' && *p != 'E') { - frexp(fval, &frexp_result); - i = (mrb_int)frexp_result; + int i; + frexp(fval, &i); if (i > 0) need = BIT_DIGITS(i); } |
