From a713f079bfd479048cced315312ede5e2a3d9299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 11 Jun 2015 17:48:53 +0200 Subject: [PATCH] Fix unaligned copy. --- include/evmjit/JIT.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/evmjit/JIT.h b/include/evmjit/JIT.h index 85c74ba18..0a938fae9 100644 --- a/include/evmjit/JIT.h +++ b/include/evmjit/JIT.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #ifdef _MSC_VER @@ -38,7 +39,7 @@ struct i256 uint64_t words[4]; i256() = default; - i256(h256 _h) { *this = *reinterpret_cast(&_h); } + i256(h256 _h) { std::memcpy(this, &_h, sizeof(*this)); } }; // TODO: Merge with ExecutionContext