[repacker] use memcpy to avoid alignment issues.
This commit is contained in:
parent
f1d3489388
commit
b17fbc200b
|
@ -34,7 +34,7 @@ bool read(const uint8_t** data, size_t* size, T* out)
|
|||
{
|
||||
if (*size < sizeof (T)) return false;
|
||||
|
||||
*out = * ((T*) *data);
|
||||
memcpy(out, *data, sizeof (T));
|
||||
|
||||
*data += sizeof (T);
|
||||
*size -= sizeof (T);
|
||||
|
|
Loading…
Reference in New Issue