diff options
Diffstat (limited to 'src/key_io.cpp')
-rw-r--r-- | src/key_io.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/key_io.cpp b/src/key_io.cpp index c89493e29d..3559f3a03d 100644 --- a/src/key_io.cpp +++ b/src/key_io.cpp @@ -188,13 +188,9 @@ CTxDestination DecodeDestination(const std::string& str, const CChainParams& par } // Perform Bech32 error location - if (!error_locations) { - std::vector<int> dummy_errors; - error_str = bech32::LocateErrors(str, dummy_errors); - } else { - error_str = bech32::LocateErrors(str, *error_locations); - } - + auto res = bech32::LocateErrors(str); + error_str = res.first; + if (error_locations) *error_locations = std::move(res.second); return CNoDestination(); } } // namespace |