Skip to content

Commit 8eb0add

Browse files
committed
arith: fix some constructor issues.
1 parent 15a0b61 commit 8eb0add

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libzerocoin/bignum.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,15 @@ class CBigNum
281281
{
282282
unsigned int nSize = BN_bn2mpi(bn, NULL);
283283
if (nSize < 4)
284-
return 0;
284+
return uint256(0);
285285
if (bitSize() > 256) {
286286
return MaxUint256();
287287
}
288288
std::vector<unsigned char> vch(nSize);
289289
BN_bn2mpi(bn, &vch[0]);
290290
if (vch.size() > 4)
291291
vch[4] &= 0x7f;
292-
uint256 n = 0;
292+
uint256 n(0);
293293
for (unsigned int i = 0, j = vch.size()-1; i < sizeof(n) && j >= 4; i++, j--)
294294
((unsigned char*)&n)[i] = vch[j];
295295
return n;
@@ -298,7 +298,7 @@ class CBigNum
298298
arith_uint256 getarith_uint256() const
299299
{
300300
auto n = getuint256();
301-
return Uint256ToArith(n);
301+
return UintToArith256(n);
302302
}
303303

304304
void setvch(const std::vector<unsigned char>& vch)

0 commit comments

Comments
 (0)