Merge pull request #2240 from ergo720/xeloadsection_bug_fix
Make XeLoadSection return status_invalid_handle when it cannot find the requested section
This commit is contained in:
commit
addf4b42fd
|
@ -64,7 +64,7 @@ XBSYSAPI EXPORTNUM(327) xbox::ntstatus_xt NTAPI xbox::XeLoadSection
|
|||
LOG_FUNC_ARG(Section)
|
||||
LOG_FUNC_END;
|
||||
|
||||
NTSTATUS ret = xbox::status_success;
|
||||
NTSTATUS ret = status_success;
|
||||
|
||||
void* sectionData = CxbxKrnl_Xbe->FindSection(Section);
|
||||
if (sectionData != nullptr) {
|
||||
|
@ -97,6 +97,9 @@ XBSYSAPI EXPORTNUM(327) xbox::ntstatus_xt NTAPI xbox::XeLoadSection
|
|||
// Increment the reference count
|
||||
Section->SectionReferenceCount++;
|
||||
}
|
||||
else {
|
||||
ret = status_invalid_handle;
|
||||
}
|
||||
|
||||
RETURN(ret);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue