Update unaligned.h

This commit is contained in:
Alexey Milovidov 2022-08-04 01:58:08 +03:00 committed by GitHub
parent 57e31cadfa
commit 6cc08afb72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,13 +10,13 @@ inline void reverseMemcpy(void * dst, const void * src, size_t size)
uint8_t * uint_dst = reinterpret_cast<uint8_t *>(dst); uint8_t * uint_dst = reinterpret_cast<uint8_t *>(dst);
const uint8_t * uint_src = reinterpret_cast<const uint8_t *>(src); const uint8_t * uint_src = reinterpret_cast<const uint8_t *>(src);
uint_dst += length; uint_dst += size;
while (length) while (length)
{ {
--uint_dst; --uint_dst;
*uint_dst = *uint_src; *uint_dst = *uint_src;
++uint_src; ++uint_src;
--length; --size;
} }
} }