Skip to content

Commit bb5ea1d

Browse files
committed
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.
1 parent cb32328 commit bb5ea1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/walletframe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard)
212212
return;
213213
}
214214
std::ifstream in{filename.toLocal8Bit().data(), std::ios::binary};
215-
data.assign(std::istream_iterator<unsigned char>{in}, {});
215+
data.assign(std::istreambuf_iterator<char>{in}, {});
216216

217217
// Some psbt files may be base64 strings in the file rather than binary data
218218
std::string b64_str{data.begin(), data.end()};

0 commit comments

Comments
 (0)