1
0
mirror of synced 2025-01-31 03:53:44 +01:00

fix: Correct endianess of CRC hashes

Fixes #1225
This commit is contained in:
WerWolv 2023-08-04 16:05:21 +02:00
parent d28d6d1a1b
commit 2082781cf5

View File

@ -129,6 +129,9 @@ namespace hex::plugin::builtin {
std::vector<u8> bytes(sizeof(result), 0x00);
std::memcpy(bytes.data(), &result, bytes.size());
if constexpr (std::endian::native == std::endian::little)
std::reverse(bytes.begin(), bytes.end());
return bytes;
});
}