Skip to content

Commit 6dbaf49

Browse files
committed
Change isxdigit to HexDigit in bignum.h
1 parent 00fff64 commit 6dbaf49

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/bignum.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,11 @@ class CBigNum : public CBigNumBase
369369
psz++;
370370

371371
// hex string to bignum
372-
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 };
373372
*this = 0;
374-
while (isxdigit(*psz))
373+
while (HexDigit(*psz) >= 0)
375374
{
376375
*this <<= 4;
377-
int n = phexdigit[(unsigned char)*psz++];
376+
int n = HexDigit((unsigned char)*psz++);
378377
*this += n;
379378
}
380379
if (fNegative)

0 commit comments

Comments
 (0)