mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-13 23:46:40 +00:00
kern: fix inverted conditional in KDebugBase::SetThreadContext
This commit is contained in:
parent
a6729171d3
commit
deb4aece9a
1 changed files with 6 additions and 2 deletions
|
@ -557,8 +557,12 @@ namespace ams::kern {
|
||||||
|
|
||||||
/* Verify that the thread's svc state is valid. */
|
/* Verify that the thread's svc state is valid. */
|
||||||
if (thread->IsCallingSvc()) {
|
if (thread->IsCallingSvc()) {
|
||||||
R_UNLESS(thread->GetSvcId() != svc::SvcId_Break, svc::ResultInvalidState());
|
const u8 svc_id = thread->GetSvcId();
|
||||||
R_UNLESS(thread->GetSvcId() != svc::SvcId_ReturnFromException, svc::ResultInvalidState());
|
|
||||||
|
const bool is_valid_svc = svc_id == svc::SvcId_Break ||
|
||||||
|
svc_id == svc::SvcId_ReturnFromException;
|
||||||
|
|
||||||
|
R_UNLESS(is_valid_svc, svc::ResultInvalidState());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the thread context. */
|
/* Set the thread context. */
|
||||||
|
|
Loading…
Reference in a new issue