From ab27c6aa04f6bb5539570a1cb70434a65f3ba7a8 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 29 Aug 2015 09:10:18 +0800 Subject: [PATCH] return immediately if emulation is already done. this fixes issue #65 --- uc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uc.c b/uc.c index 3192c627..d916c8aa 100755 --- a/uc.c +++ b/uc.c @@ -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);