aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-09-25 23:29:32 +0200
committerRiccardo Spagni <ric@spagni.net>2017-09-25 23:29:32 +0200
commit21c2c080416049a042b696ddae5a559176d2ccde (patch)
tree0bafbac0a09deb8a0838db2cf738c186824166a7 /src/cryptonote_core
parentMerge pull request #2526 (diff)
parentcore: fix creation of v1 txes (diff)
downloadmonero-21c2c080416049a042b696ddae5a559176d2ccde.tar.xz
Merge pull request #2527
ba6907f6 core: fix creation of v1 txes (moneromooo-monero)
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