Browse Source

Fix check is thread current in GetThreadContext

Misplaced break made it only check for the first core.
nce_cpp
Valeri 4 years ago
committed by GitHub
parent
commit
190e12a072
  1. 2
      src/core/hle/kernel/svc.cpp

2
src/core/hle/kernel/svc.cpp

@ -1078,9 +1078,9 @@ static ResultCode GetThreadContext(Core::System& system, VAddr out_context, Hand
for (auto i = 0; i < static_cast<s32>(Core::Hardware::NUM_CPU_CORES); ++i) { for (auto i = 0; i < static_cast<s32>(Core::Hardware::NUM_CPU_CORES); ++i) {
if (thread.GetPointerUnsafe() == kernel.Scheduler(i).GetCurrentThread()) { if (thread.GetPointerUnsafe() == kernel.Scheduler(i).GetCurrentThread()) {
current = true; current = true;
}
break; break;
} }
}
// If the thread is current, retry until it isn't. // If the thread is current, retry until it isn't.
if (current) { if (current) {

Loading…
Cancel
Save