Skip to content

Commit cc3971c

Browse files
committed
GUI: Write PSBTs to file with binary mode
1 parent 43f3ada commit cc3971c

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
@@ -434,7 +434,7 @@ void SendCoinsDialog::on_sendButton_clicked()
434434
if (filename.isEmpty()) {
435435
return;
436436
}
437-
std::ofstream out(filename.toLocal8Bit().data());
437+
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
438438
out << ssTx.str();
439439
out.close();
440440
Q_EMIT message(tr("PSBT saved"), "PSBT saved to disk", CClientUIInterface::MSG_INFORMATION);

0 commit comments

Comments
 (0)