Skip to content

Commit

Permalink
Reduce array
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Nov 6, 2024
1 parent a1ff531 commit 8c2c577
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Neo/Cryptography/Base58.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static class Base58
7, 8, -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, 12, 13, 14, 15, 16, -1, 17,
18, 19, 20, 21, -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
-1, -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57
];
#pragma warning restore format

Expand Down Expand Up @@ -89,7 +89,7 @@ public static byte[] Decode(string input)
var bi = BigInteger.Zero;
for (int i = 0; i < input.Length; i++)
{
if (input[i] > 127 || s_decodeMap[input[i]] == -1)
if (input[i] >= 123 || s_decodeMap[input[i]] == -1)
throw new FormatException($"Invalid Base58 character '{input[i]}' at position {i}");
bi = bi * s_alphabetLength + s_decodeMap[input[i]];
}
Expand Down

0 comments on commit 8c2c577

Please sign in to comment.