From 88cd807379152ea3fec5f534e5f4d6ebebd53982 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 25 Apr 2017 10:39:11 +0900 Subject: Avoid use of `snprintf()` when DISABLE_STDIO is set; fix #3632 ref #3492 #3515 #3517 --- mrbgems/mruby-proc-ext/src/proc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mrbgems/mruby-proc-ext/src/proc.c') 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, "-"); -- cgit v1.2.3