aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-09-25 22:27:30 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-09-25 22:27:30 +0100
commitba6907f6611942525e96ce6af5872ddc384120d0 (patch)
treef911c0bd5d8f308449a0d71ae032f9fbbe64bcb2 /src/cryptonote_core
parentMerge pull request #2466 (diff)
downloadmonero-ba6907f6611942525e96ce6af5872ddc384120d0.tar.xz
core: fix creation of v1 txes
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_tx_utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp
index d2a7eedf5..2ffaea834 100644
--- a/src/cryptonote_core/cryptonote_tx_utils.cpp
+++ b/src/cryptonote_core/cryptonote_tx_utils.cpp
@@ -320,7 +320,8 @@ namespace cryptonote
});
tools::apply_permutation(outs_order, [&] (size_t i0, size_t i1) {
std::swap(tx.vout[i0], tx.vout[i1]);
- std::swap(amount_keys[i0], amount_keys[i1]);
+ if (!amount_keys.empty())
+ std::swap(amount_keys[i0], amount_keys[i1]);
});
//check money