[repacker] use memcpy to avoid alignment issues.

This commit is contained in:
Garret Rieger 2022-12-05 20:34:51 +00:00 committed by Behdad Esfahbod
parent f1d3489388
commit b17fbc200b
1 changed files with 1 additions and 1 deletions

View File

@ -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);