mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-struct/struct.c: need to copy the argument array
Just in case for stack reallocations.
This commit is contained in:
@@ -149,7 +149,7 @@ mrb_data_new(mrb_state *mrb, mrb_value self)
|
||||
}
|
||||
else {
|
||||
mrb_int argc;
|
||||
mrb_get_args(mrb, "*!", &vals, &argc);
|
||||
mrb_get_args(mrb, "*", &vals, &argc);
|
||||
if (n != argc) {
|
||||
mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong number of arguments");
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ mrb_struct_initialize(mrb_state *mrb, mrb_value self)
|
||||
const mrb_value *argv;
|
||||
mrb_int argc;
|
||||
|
||||
mrb_get_args(mrb, "*!", &argv, &argc);
|
||||
mrb_get_args(mrb, "*", &argv, &argc);
|
||||
return mrb_struct_initialize_withArg(mrb, argc, argv, self);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user