mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Move fmt_setup until absolutely necessary.
This commit is contained in:
@@ -1082,7 +1082,6 @@ retry:
|
||||
break;
|
||||
}
|
||||
|
||||
fmt_setup(fbuf, sizeof(fbuf), *p, flags, width, prec);
|
||||
need = 0;
|
||||
if (*p != 'e' && *p != 'E') {
|
||||
int i;
|
||||
@@ -1104,6 +1103,7 @@ retry:
|
||||
need += 20;
|
||||
|
||||
CHECK(need);
|
||||
fmt_setup(fbuf, sizeof(fbuf), *p, flags, width, prec);
|
||||
n = mrb_float_to_cstr(mrb, &buf[blen], need, fbuf, fval);
|
||||
if (n < 0 || n >= need) {
|
||||
mrb_raise(mrb, E_RUNTIME_ERROR, "formatting error");
|
||||
|
||||
Reference in New Issue
Block a user