Skip to content

Commit 3a12672

Browse files
achow101MarcoFalke
authored andcommitted
GUI: Write PSBTs to file with binary mode
Github-Pull: #bitcoin-core/gui#188 Rebased-From: cc3971c
1 parent 36ecf5e commit 3a12672

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/qt/psbtoperationsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void PSBTOperationsDialog::saveTransaction() {
145145
if (filename.isEmpty()) {
146146
return;
147147
}
148-
std::ofstream out(filename.toLocal8Bit().data());
148+
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
149149
out << ssTx.str();
150150
out.close();
151151
showStatus(tr("PSBT saved to disk."), StatusLevel::INFO);

src/qt/sendcoinsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ void SendCoinsDialog::on_sendButton_clicked()
427427
if (filename.isEmpty()) {
428428
return;
429429
}
430-
std::ofstream out(filename.toLocal8Bit().data());
430+
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
431431
out << ssTx.str();
432432
out.close();
433433
Q_EMIT message(tr("PSBT saved"), "PSBT saved to disk", CClientUIInterface::MSG_INFORMATION);

0 commit comments

Comments
 (0)