diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-04-08 19:02:45 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-04-08 19:06:36 +0900 |
| commit | 6cec0c9f62c176e9bd926d12551b384315e98388 (patch) | |
| tree | 569f8fa8ebe583a20b713186fc8ecad5a79903af /src | |
| parent | 2595d5f6c8b8d5f325b57bddb0683ddca7bba0e9 (diff) | |
| download | mruby-6cec0c9f62c176e9bd926d12551b384315e98388.tar.gz mruby-6cec0c9f62c176e9bd926d12551b384315e98388.zip | |
Fix C99 style inline declaration; fix #4365
Diffstat (limited to 'src')
| -rw-r--r-- | src/numeric.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/numeric.c b/src/numeric.c index 4128ea3a6..742df7b76 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -207,12 +207,12 @@ flo_to_s(mrb_state *mrb, mrb_value flt) char fmt[] = "%." MRB_STRINGIZE(FLO_TO_STR_PREC) "g"; mrb_value str = mrb_float_to_str(mrb, flt, fmt); mrb_int len; - char *begp; + char *begp, *p, *endp; insert_dot_zero: begp = RSTRING_PTR(str); len = RSTRING_LEN(str); - for (char *p = begp, *endp = p + len; p < endp; ++p) { + for (p = begp, endp = p + len; p < endp; ++p) { if (*p == '.') { return str; } |
