fmt_fp.c: exponential may be bigger than `100`.

parent d121075e
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment