Fix a bug when nested uc_emu_start deletes a hook

This commit is contained in:
lazymio 2022-04-26 01:05:12 +02:00
parent f9bb1ba505
commit aab93926dc
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873

3
uc.c
View File

@ -847,10 +847,11 @@ uc_err uc_emu_start(uc_engine *uc, uint64_t begin, uint64_t until,
// or we may lost uc_emu_stop
if (uc->nested_level == 0) {
uc->emulation_done = true;
}
// remove hooks to delete
// make sure we delete all hooks at the first level.
clear_deleted_hooks(uc);
}
if (timeout) {
// wait for the timer to finish