[Kernel/XAM] XamContentGetCreator: Added check for existing content

This commit is contained in:
Gliniak 2021-01-04 20:13:10 +01:00 committed by Rick Gibbed
parent ea9625fca8
commit f298d7620a
1 changed files with 16 additions and 9 deletions

View File

@ -280,6 +280,10 @@ dword_result_t XamContentGetCreator(dword_t user_index,
auto content_data = auto content_data =
static_cast<ContentData>(*content_data_ptr.as<XCONTENT_DATA*>()); static_cast<ContentData>(*content_data_ptr.as<XCONTENT_DATA*>());
bool content_exists =
kernel_state()->content_manager()->ContentExists(content_data);
if (content_exists) {
if (content_data.content_type == 1) { if (content_data.content_type == 1) {
// User always creates saves. // User always creates saves.
*is_creator_ptr = 1; *is_creator_ptr = 1;
@ -292,6 +296,9 @@ dword_result_t XamContentGetCreator(dword_t user_index,
*creator_xuid_ptr = 0; *creator_xuid_ptr = 0;
} }
} }
} else {
result = X_ERROR_PATH_NOT_FOUND;
}
if (overlapped_ptr) { if (overlapped_ptr) {
kernel_state()->CompleteOverlappedImmediate(overlapped_ptr, result); kernel_state()->CompleteOverlappedImmediate(overlapped_ptr, result);