From b441bfc72b7f64d46312d2b07a970587dfe42080 Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 24 Aug 2019 18:33:10 -0400 Subject: [PATCH] monero_tx_set does not initialize empty strings --- src/wallet/monero_wallet.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wallet/monero_wallet.cpp b/src/wallet/monero_wallet.cpp index 5412f41..bd51ec8 100644 --- a/src/wallet/monero_wallet.cpp +++ b/src/wallet/monero_wallet.cpp @@ -1989,8 +1989,8 @@ namespace monero { // build and return tx set monero_tx_set tx_set; tx_set.m_txs = txs; - tx_set.m_multisig_tx_hex = multisig_tx_hex; - tx_set.m_unsigned_tx_hex = unsigned_tx_hex; + if (!multisig_tx_hex.empty()) tx_set.m_multisig_tx_hex = multisig_tx_hex; + if (!unsigned_tx_hex.empty()) tx_set.m_unsigned_tx_hex = unsigned_tx_hex; return tx_set; } @@ -2163,8 +2163,8 @@ namespace monero { // build and return tx set monero_tx_set tx_set; tx_set.m_txs = txs; - tx_set.m_multisig_tx_hex = multisig_tx_hex; - tx_set.m_unsigned_tx_hex = unsigned_tx_hex; + if (!multisig_tx_hex.empty()) tx_set.m_multisig_tx_hex = multisig_tx_hex; + if (!unsigned_tx_hex.empty()) tx_set.m_unsigned_tx_hex = unsigned_tx_hex; return tx_set; } @@ -2282,8 +2282,8 @@ namespace monero { // build and return tx set monero_tx_set tx_set; tx_set.m_txs = txs; - tx_set.m_multisig_tx_hex = multisig_tx_hex; - tx_set.m_unsigned_tx_hex = unsigned_tx_hex; + if (!multisig_tx_hex.empty()) tx_set.m_multisig_tx_hex = multisig_tx_hex; + if (!unsigned_tx_hex.empty()) tx_set.m_unsigned_tx_hex = unsigned_tx_hex; return tx_set; }