jump_fcontext should set the outValue of fiber being switched to rather the one being switched from
Fixes #5162
This commit is contained in:
parent
3b1f1f7b6a
commit
cb013604a9
|
@ -1297,10 +1297,9 @@ fcontext_t LIBCONTEXT_CALL_CONVENTION make_fcontext(void* sp, size_t size, void(
|
|||
intptr_t LIBCONTEXT_CALL_CONVENTION jump_fcontext(fcontext_t* ofc, fcontext_t nfc,
|
||||
intptr_t vp, bool preserve_fpu)
|
||||
{
|
||||
auto current = (void*)GetCurrentFiber();
|
||||
fiberParams[current].outValue = vp;
|
||||
*ofc = GetCurrentFiber();
|
||||
fiberParams[nfc].inValue = vp;
|
||||
fiberParams[nfc].outValue = vp;
|
||||
SwitchToFiber(nfc);
|
||||
return fiberParams[*ofc].outValue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue