diff --git a/unity/native_src_il2cpp/Src/PesapiV8Impl.cpp b/unity/native_src_il2cpp/Src/PesapiV8Impl.cpp index d56c718ef8..1711a84057 100644 --- a/unity/native_src_il2cpp/Src/PesapiV8Impl.cpp +++ b/unity/native_src_il2cpp/Src/PesapiV8Impl.cpp @@ -78,7 +78,7 @@ inline pesapi_value PesapiValueFromV8LocalValue(v8::Local local) inline v8::Local V8LocalValueFromPesapiValue(pesapi_value v) { v8::Local local; - memcpy(static_cast(&local), &v, sizeof(v)); + *reinterpret_cast(&local) = v; return local; } @@ -90,7 +90,7 @@ inline pesapi_env PesapiEnvFromV8LocalContext(v8::Local local) inline v8::Local V8LocalContextFromPesapiEnv(pesapi_env v) { v8::Local local; - memcpy(static_cast(&local), &v, sizeof(v)); + *reinterpret_cast(&local) = v; return local; } } // namespace v8impl