mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fix MSVC initialization issue by a patch from @dyama; close #2734
This commit is contained in:
+4
-1
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user