Raise the 90-character limit on Bech32 encodings

Regtest addresses are 91 characters, and ZIP 32's Bech32 encoding will
be significantly longer.
This commit is contained in:
Jack Grigg
2018-07-09 23:41:41 +01:00
parent 4715b31c76
commit 281b51e567
2 changed files with 2 additions and 2 deletions

View File

@@ -169,7 +169,7 @@ std::pair<std::string, data> Decode(const std::string& str) {
}
if (lower && upper) return {};
size_t pos = str.rfind('1');
if (str.size() > 90 || pos == str.npos || pos == 0 || pos + 7 > str.size()) {
if (str.size() > 1023 || pos == str.npos || pos == 0 || pos + 7 > str.size()) {
return {};
}
data values(str.size() - 1 - pos);