diff --git a/vvp/class_type.cc b/vvp/class_type.cc index 48ccb33c8..e0e56d995 100644 --- a/vvp/class_type.cc +++ b/vvp/class_type.cc @@ -388,8 +388,8 @@ void property_object::get_object(char*buf, vvp_object_t&val, uint64_t idx) void property_object::copy(char*dst, char*src) { - vvp_object_t*dst_obj = reinterpret_cast(dst); - vvp_object_t*src_obj = reinterpret_cast(src); + vvp_object_t*dst_obj = reinterpret_cast(dst+offset_); + vvp_object_t*src_obj = reinterpret_cast(src+offset_); for (size_t idx = 0 ; idx < array_size_ ; idx += 1) dst_obj[idx] = src_obj[idx]; }