fmt_fp.c: revert 647324ad45c0d779a3c36f0bb7955b8b8fc9f491

C++ complier does not allow jump across local variable declaration, even
if we don't access those variables after the destination label.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-08-07 22:51:37 +09:00
parent 8591211494
commit 12bd395012
+4 -2
View File
@@ -118,7 +118,9 @@ mrb_format_float(mrb_float f, char *buf, size_t buf_size, char fmt, int prec, ch
*s++ = 'N' ^ uc;
*s++ = 'A' ^ uc;
*s++ = 'N' ^ uc;
goto ret;
ret:
*s = '\0';
return (int)(s - buf);
}
}
@@ -363,7 +365,7 @@ mrb_format_float(mrb_float f, char *buf, size_t buf_size, char fmt, int prec, ch
*s++ = '0' + (e / 10);
*s++ = '0' + (e % 10);
}
ret:
*s = '\0';
return (int)(s - buf);
}