mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
core: don't try to deserialize an empty extra to remove a field
This commit is contained in:
parent
ab69d5b367
commit
64da0983d5
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue