Fix bug in Base58.decode that caused failures when the MSB of the decoded byte array was 1. Thanks to BitterTea and sipa for help with debugging this.

This commit is contained in:
Mike Hearn
2011-05-24 20:19:18 +00:00
parent 5a3d188d03
commit ab7351ff78
2 changed files with 17 additions and 2 deletions

View File

@@ -42,5 +42,9 @@ public class Base58Test extends TestCase {
}
Base58.decodeChecked("4stwEBjT6FYyVV");
// Now check we can correctly decode the case where the high bit of the first byte is not zero, so BigInteger
// sign extends. Fix for a bug that stopped us parsing keys exported using sipas patch.
Base58.decodeChecked("93VYUMzRG9DdbRP72uQXjaWibbQwygnvaCu9DumcqDjGybD864T");
}
}