mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
+4
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user