1
0
Fork 0

DBG: fixed a potential bug with running a script and then exiting x64_dbg

This commit is contained in:
Mr. eXoDia 2014-06-18 21:23:52 +02:00
parent 6d09617554
commit b4df671222
2 changed files with 5 additions and 0 deletions

View File

@ -599,7 +599,11 @@ bool scriptcmdexec(const char* command)
void scriptabort() void scriptabort()
{ {
if(bIsRunning) if(bIsRunning)
{
bAbort=true; bAbort=true;
while(bIsRunning)
Sleep(1);
}
else //reset the script else //reset the script
scriptsetip(0); scriptsetip(0);
} }

View File

@ -253,6 +253,7 @@ extern "C" DLL_EXPORT const char* _dbg_dbginit()
extern "C" DLL_EXPORT void _dbg_dbgexitsignal() extern "C" DLL_EXPORT void _dbg_dbgexitsignal()
{ {
cbStopDebug(0, 0); cbStopDebug(0, 0);
scriptabort();
wait(WAITID_STOP); //after this, debugging stopped wait(WAITID_STOP); //after this, debugging stopped
pluginunload(); pluginunload();
TerminateThread(hCommandLoopThread, 0); TerminateThread(hCommandLoopThread, 0);