Skip to content

Commit

Permalink
Change isxdigit to HexDigit in bignum.h
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescowens committed Aug 7, 2021
1 parent 728d7b7 commit cf4d321
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/bignum.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,11 @@ class CBigNum : public CBigNumBase
psz++;

// hex string to bignum
static const signed char phexdigit[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0 };
*this = 0;
while (isxdigit(*psz))
while (::HexDigit(*psz) >= 0)
{
*this <<= 4;
int n = phexdigit[(unsigned char)*psz++];
int n = ::HexDigit((unsigned char)*psz++);
*this += n;
}
if (fNegative)
Expand Down

0 comments on commit cf4d321

Please sign in to comment.