mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fmt_fp.c: exponential may be bigger than 100.
This commit is contained in:
@@ -356,6 +356,10 @@ mrb_format_float(mrb_float f, char *buf, size_t buf_size, char fmt, int prec, ch
|
||||
if (e_sign) {
|
||||
*s++ = e_char;
|
||||
*s++ = e_sign;
|
||||
if (e >= 100) {
|
||||
*s++ = '0' + (e / 100);
|
||||
e %= 100;
|
||||
}
|
||||
*s++ = '0' + (e / 10);
|
||||
*s++ = '0' + (e % 10);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user