aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-01-07 16:05:02 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-01-16 08:59:02 +0000
commit64da0983d5fa5042e45da738b6d5dcda38331b8a (patch)
tree52dfb34455e0568eb1c4398ab102d94627f54220 /src
parentMerge pull request #1569 (diff)
downloadmonero-64da0983d5fa5042e45da738b6d5dcda38331b8a.tar.xz
core: don't try to deserialize an empty extra to remove a field
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/cryptonote_format_utils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp
index b5f2b069d..e04409d87 100644
--- a/src/cryptonote_core/cryptonote_format_utils.cpp
+++ b/src/cryptonote_core/cryptonote_format_utils.cpp
@@ -371,6 +371,8 @@ namespace cryptonote
//---------------------------------------------------------------
bool remove_field_from_tx_extra(std::vector<uint8_t>& tx_extra, const std::type_info &type)
{
+ if (tx_extra.empty())
+ return true;
std::string extra_str(reinterpret_cast<const char*>(tx_extra.data()), tx_extra.size());
std::istringstream iss(extra_str);
binary_archive<false> ar(iss);