X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fbase58.h;h=8c0ced78d88b63c7177fbc90f2f92a1889f28c1a;hb=532b9005ab4fc02db3db424b4631fe395e0b9071;hp=e3dc380e7340382fc63dc910c72ac8d7fdf02104;hpb=84a4a7763f386934da90e2bd1e355b70023fa9ca;p=novacoin.git diff --git a/src/base58.h b/src/base58.h index e3dc380..8c0ced7 100644 --- a/src/base58.h +++ b/src/base58.h @@ -51,7 +51,7 @@ inline std::string EncodeBase58(const unsigned char* pbegin, const unsigned char if (!BN_div(&dv, &rem, &bn, &bn58, pctx)) throw bignum_error("EncodeBase58 : BN_div failed"); bn = dv; - unsigned int c = rem.getulong(); + unsigned int c = rem.getuint32(); str += pszBase58[c]; } @@ -94,7 +94,7 @@ inline bool DecodeBase58(const char* psz, std::vector& vchRet) return false; break; } - bnChar.setulong(p1 - pszBase58); + bnChar.setuint32((uint32_t)(p1 - pszBase58)); if (!BN_mul(&bn, &bn, &bn58, pctx)) throw bignum_error("DecodeBase58 : BN_mul failed"); bn += bnChar;