diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-25 10:39:11 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-25 10:41:50 +0900 |
| commit | 88cd807379152ea3fec5f534e5f4d6ebebd53982 (patch) | |
| tree | f6b27a76821b8b92f6fc474ce56aab5795afb51b /mrbgems/mruby-proc-ext | |
| parent | 03cdb8e9dd3447115530418c2b8183c94dee2a53 (diff) | |
| download | mruby-88cd807379152ea3fec5f534e5f4d6ebebd53982.tar.gz mruby-88cd807379152ea3fec5f534e5f4d6ebebd53982.zip | |
Avoid use of `snprintf()` when DISABLE_STDIO is set; fix #3632
ref #3492 #3515 #3517
Diffstat (limited to 'mrbgems/mruby-proc-ext')
| -rw-r--r-- | mrbgems/mruby-proc-ext/src/proc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/mrbgems/mruby-proc-ext/src/proc.c b/mrbgems/mruby-proc-ext/src/proc.c index f7f031e7b..b13606f5f 100644 --- a/mrbgems/mruby-proc-ext/src/proc.c +++ b/mrbgems/mruby-proc-ext/src/proc.c @@ -52,10 +52,7 @@ mrb_proc_inspect(mrb_state *mrb, mrb_value self) line = mrb_debug_get_line(irep, 0); if (line != -1) { - char buf[32]; - - snprintf(buf, sizeof(buf), "%" PRId32, line); - mrb_str_cat_cstr(mrb, str, buf); + str = mrb_format(mrb, "%S:%S", str, mrb_fixnum_value(line)); } else { mrb_str_cat_lit(mrb, str, "-"); |
