Merge pull request #4160 from mimaki/wrong-negative-float-in-mrb

Wrong pool data length for negative floating value in a mrb file.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-11-07 18:22:13 +09:00
committed by GitHub
+1 -1
View File
@@ -379,7 +379,7 @@ mrb_float_to_str(mrb_state *mrb, mrb_value flo, const char *fmt)
mrb_value
mrb_float_to_str(mrb_state *mrb, mrb_value flo, const char *fmt)
{
char buf[24];
char buf[25];
snprintf(buf, sizeof(buf), fmt, mrb_float(flo));
return mrb_str_new_cstr(mrb, buf);