fix length test (#314)

This commit is contained in:
m2049r 2018-06-14 22:28:33 +02:00 committed by GitHub
parent 3c8a4ce967
commit 8985511209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ public class BitcoinAddressValidator {
byte[] result = new byte[25]; byte[] result = new byte[25];
byte[] numBytes = num.toByteArray(); byte[] numBytes = num.toByteArray();
if (numBytes.length > result.length) return null; if (num.bitLength() > 200) return null;
if (num.bitLength() == 200) { if (num.bitLength() == 200) {
System.arraycopy(numBytes, 1, result, 0, 25); System.arraycopy(numBytes, 1, result, 0, 25);