From ba6907f6611942525e96ce6af5872ddc384120d0 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 25 Sep 2017 22:27:30 +0100 Subject: [PATCH] core: fix creation of v1 txes --- src/cryptonote_core/cryptonote_tx_utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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