mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
print.c (mrb_print_m): need to copy argument array; fix #6467
This commit is contained in:
+3
-2
@@ -69,9 +69,10 @@ mrb_core_init_printabort(mrb_state *mrb)
|
||||
mrb_value
|
||||
mrb_print_m(mrb_state *mrb, mrb_value self)
|
||||
{
|
||||
mrb_int argc = mrb_get_argc(mrb);
|
||||
const mrb_value *argv = mrb_get_argv(mrb);
|
||||
mrb_int argc;
|
||||
mrb_value *argv;
|
||||
|
||||
mrb_get_args(mrb, "*", &argv, &argc);
|
||||
for (mrb_int i=0; i<argc; i++) {
|
||||
printstr(mrb, mrb_obj_as_string(mrb, argv[i]), stdout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user