fix MSVC initialization issue by a patch from @dyama; close #2734

This commit is contained in:
Yukihiro "Matz" Matsumoto
2015-02-27 17:14:32 +09:00
parent 3df3216179
commit 3cba701672
+4 -1
View File
@@ -360,7 +360,10 @@ fmt_core(struct fmt_args *f, const char *fmt, mrb_float flo)
mrb_value
mrb_float_to_str(mrb_state *mrb, mrb_value flo, const char *fmt)
{
struct fmt_args f = { mrb, mrb_str_buf_new(mrb, 24) };
struct fmt_args f;
f.mrb = mrb;
f.str = mrb_str_buf_new(mrb, 24);
if (fmt_core(&f, fmt, mrb_float(flo)) < 0) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "invalid format string");
}