Support hook deletion during hook deletion

This commit is contained in:
momo5502
2025-08-09 17:23:58 +02:00
parent 386f5b1cbc
commit eb07148bfd
2 changed files with 4 additions and 0 deletions

View File

@@ -377,7 +377,9 @@ namespace icicle
}
icicle_remove_hook(this->emu_, id);
const auto obj = std::move(entry->second);
this->hooks_.erase(entry);
(void)obj;
}
void serialize_state(utils::buffer_serializer& buffer, const bool is_snapshot) const override

View File

@@ -605,7 +605,9 @@ namespace unicorn
if (entry != this->hooks_.end())
{
const auto obj = std::move(*entry);
this->hooks_.erase(entry);
(void)obj;
}
}