We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 84a7789 + e96c518 commit 7077fe6Copy full SHA for 7077fe6
src/uint256.cpp
@@ -45,7 +45,7 @@ void base_blob<BITS>::SetHex(const char* psz)
45
psz++;
46
psz--;
47
unsigned char* p1 = (unsigned char*)data;
48
- unsigned char* pend = p1 + WIDTH * 4;
+ unsigned char* pend = p1 + WIDTH;
49
while (psz >= pbegin && p1 < pend) {
50
*p1 = ::HexDigit(*psz--);
51
if (psz >= pbegin) {
@@ -128,7 +128,7 @@ uint64_t uint256::GetHash(const uint256& salt) const
128
uint32_t a, b, c;
129
const uint32_t *pn = (const uint32_t*)data;
130
const uint32_t *salt_pn = (const uint32_t*)salt.data;
131
- a = b = c = 0xdeadbeef + (WIDTH << 2);
+ a = b = c = 0xdeadbeef + WIDTH;
132
133
a += pn[0] ^ salt_pn[0];
134
b += pn[1] ^ salt_pn[1];
0 commit comments