From e8ee7a07901069f7b3d3dab5425d029162a3bfa2 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sat, 5 Oct 2019 23:07:40 +0100 Subject: [PATCH] [util] Fix Sha1 dword extraction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously we were getting incorrect values here. The u suffix is no longer necessary, which was originally there to work around a MSVC compiler warning which now doesn't happen under the new code 🤷‍♀ --- src/util/sha1/sha1_util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/sha1/sha1_util.h b/src/util/sha1/sha1_util.h index b1859b7b..f18cf9d9 100644 --- a/src/util/sha1/sha1_util.h +++ b/src/util/sha1/sha1_util.h @@ -24,10 +24,10 @@ namespace dxvk { std::string toString() const; uint32_t dword(uint32_t id) const { - return uint32_t(m_digest[4u + id + 0u]) << 0u - | uint32_t(m_digest[4u + id + 1u]) << 8u - | uint32_t(m_digest[4u + id + 2u]) << 16u - | uint32_t(m_digest[4u + id + 3u]) << 24u; + return uint32_t(m_digest[4 * id + 0]) << 0 + | uint32_t(m_digest[4 * id + 1]) << 8 + | uint32_t(m_digest[4 * id + 2]) << 16 + | uint32_t(m_digest[4 * id + 3]) << 24; } bool operator == (const Sha1Hash& other) const {