diff options
author | Andrew Chow <github@achow101.com> | 2022-12-18 13:20:20 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-12-18 13:20:20 -0500 |
commit | bb5ea1d9a954b7b9f443ee8fbbb04549cd0b08a7 (patch) | |
tree | 7eb4ba6692530954edcc2fa6a6bb171d0e7cc946 /src/qt/walletframe.cpp | |
parent | cb32328d1b80d0ccd6eb9532bd8fe4e0a4de385e (diff) |
qt: Load PSBTs using istreambuf_iterator rather than istream_iterator
istream_iterator eats whitespace charactesr which causes parsing
failures for PSBTs that contain the bytes corresponding to those
characters.
Diffstat (limited to 'src/qt/walletframe.cpp')
-rw-r--r-- | src/qt/walletframe.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index 8dc97e66a2..adc7793916 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -212,7 +212,7 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard) return; } std::ifstream in{filename.toLocal8Bit().data(), std::ios::binary}; - data.assign(std::istream_iterator<unsigned char>{in}, {}); + data.assign(std::istreambuf_iterator<char>{in}, {}); // Some psbt files may be base64 strings in the file rather than binary data std::string b64_str{data.begin(), data.end()}; |