1
0
mirror of synced 2024-11-12 02:00:52 +01:00

fix: Crash when using CRC hashes

This commit is contained in:
WerWolv 2024-02-27 22:39:18 +01:00
parent 72645aa800
commit eaa4688182

View File

@ -183,6 +183,9 @@ namespace hex::plugin::hashes {
Function create(std::string name) override {
return Hash::create(name, [hash = *this](const Region& region, prv::Provider *provider) -> std::vector<u8> {
auto crc = HashFactory::Checksum::CreateCRC(hash.m_width, hash.m_polynomial, hash.m_initialValue, hash.m_reflectIn, hash.m_reflectOut, hash.m_xorOut, 0, { "CRC" });
crc->Initialize();
auto bytes = hashProviderRegionWithHashLib(region, provider, crc);
return bytes;