Prevent stack overflow by popping the pcall return value / error
This commit is contained in:
parent
e44af28b8e
commit
82716b247b
|
@ -465,6 +465,8 @@ void CScriptInstance::InvokeListenerCallback(IOLISTENER* lpListener)
|
|||
const char* msg = duk_safe_to_string(m_Ctx, -1);
|
||||
MessageBox(NULL, stdstr(msg).ToUTF16().c_str(), L"Script error", MB_OK | MB_ICONWARNING);
|
||||
}
|
||||
|
||||
duk_pop(m_Ctx);
|
||||
}
|
||||
|
||||
const char* CScriptInstance::Eval(const char* jsCode)
|
||||
|
|
Loading…
Reference in New Issue