mirror of
https://github.com/monero-project/monero.git
synced 2024-12-29 15:26:13 -05:00
core: don't try to deserialize an empty extra to remove a field
This commit is contained in:
parent
ab69d5b367
commit
64da0983d5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user