diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc index 96dbba1b8..e1ec47aef 100644 --- a/libziparchive/zip_archive.cc +++ b/libziparchive/zip_archive.cc @@ -102,9 +102,8 @@ static uint32_t RoundUpPower2(uint32_t val) { } static uint32_t ComputeHash(const ZipString& name) { - return std::hash{}( - std::string_view(reinterpret_cast(name.name), name.name_length)) & - UINT32_MAX; + return static_cast(std::hash{}( + std::string_view(reinterpret_cast(name.name), name.name_length))); } static bool isZipStringEqual(const uint8_t* start, const ZipString& zip_string,