summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/range.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/range.c b/src/range.c
index 98b9093ef..cdcfcca53 100644
--- a/src/range.c
+++ b/src/range.c
@@ -415,7 +415,7 @@ range_initialize_copy(mrb_state *mrb, mrb_value copy)
if (!mrb_obj_is_instance_of(mrb, src, mrb_obj_class(mrb, copy))) {
mrb_raise(mrb, E_TYPE_ERROR, "wrong argument class");
}
- memcpy(mrb_range_ptr(copy), mrb_range_ptr(src), sizeof(struct RRange));
+ *mrb_range_ptr(copy) = *mrb_range_ptr(src);
return copy;
}