mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
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.
This commit is contained in:
parent
cb32328d1b
commit
bb5ea1d9a9
1 changed files with 1 additions and 1 deletions
|
@ -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()};
|
||||
|
|
Loading…
Add table
Reference in a new issue