mirror of
https://github.com/libretro/Play-.git
synced 2024-12-04 07:20:56 +00:00
Add check to make sure we don't go below the thread's stack base.
This commit is contained in:
parent
9e595a1867
commit
10c29ecaa9
@ -1108,6 +1108,7 @@ void CPS2OS::ThreadSwitchContext(unsigned int id)
|
||||
auto thread = m_threads[m_currentThreadId];
|
||||
assert(thread);
|
||||
thread->contextPtr = m_ee.m_State.nGPR[CMIPS::SP].nV0 - STACKRES;
|
||||
assert(thread->contextPtr >= thread->stackBase);
|
||||
|
||||
auto context = reinterpret_cast<THREADCONTEXT*>(GetStructPtr(thread->contextPtr));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user