modify mrb_to_str() in order to display big float number

This commit is contained in:
takkaw
2014-02-15 00:56:35 +09:00
parent 7586d474b5
commit 0a48fb0407
+2 -1
View File
@@ -187,7 +187,8 @@ mrb_flo_to_str(mrb_state *mrb, mrb_value flo, int max_digit)
}
if (exp >= 100) {
mrb_raise(mrb, E_RANGE_ERROR, "Too large exponent.");
*(c++) = '0' + exp / 100;
exp -= exp / 100 * 100;
}
*(c++) = '0' + exp / 10;