Fix assertion condition for request_id limit (#4334)

This commit is contained in:
TheThunderTurner 2026-04-29 17:02:19 +02:00 committed by GitHub
parent 475696c542
commit 6d0318a840
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -457,7 +457,7 @@ s32 createRequest(s32 titleUserCtxId, const char* pApiGroup, const char* pPath,
request_id--;
}
// Real library would hang if this assert fails.
ASSERT_MSG(request_id <= (user_ctx_id << 0x20), "Too many requests!");
ASSERT_MSG(request_id > (user_ctx_id << 0x20), "Too many requests!");
user_context->requests[request_id] = new OrbisNpWebApiRequest{};
auto& request = user_context->requests[request_id];
@ -1531,4 +1531,4 @@ s32 PS4_SYSV_ABI readDataInternal(s64 requestId, void* pData, u64 size) {
return result;
}
}; // namespace Libraries::Np::NpWebApi
}; // namespace Libraries::Np::NpWebApi