return immediately if emulation is already done. this fixes issue #65

This commit is contained in:
Nguyen Anh Quynh 2015-08-29 09:10:18 +08:00
parent 8aba3170c6
commit ab27c6aa04

3
uc.c
View File

@ -507,6 +507,9 @@ uc_err uc_emu_stop(uch handle)
// invalid handle
return UC_ERR_UCH;
if (uc->emulation_done)
return UC_ERR_OK;
uc->stop_request = true;
// exit the current TB
cpu_exit(uc->current_cpu);