mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
test(libSceNpScoreRanking): resolve the account ID rankings with their declared type
The four account ID ranking calls take const std::uint64_t* account IDs, but the test called them through the PcId calls' const void* type, which clang's function sanitizer reports as undefined behaviour. They now use a function type that matches their declarations.
This commit is contained in:
1 parent
541ff9851d
commit
72d0c4bc85
1 file changed
+5
-4
@@ -40,6 +40,7 @@ unsigned char npIdPcIds[2 * 44];
|
||||
unsigned char accountIdPcIds[2 * 16];
|
||||
|
||||
using RankingFn = int (APS5_VABI*)(int, std::uint32_t, const void*, std::uint64_t, void*, std::uint64_t, void*, std::uint64_t, void*, std::uint64_t, std::uint64_t, void*, void*, void*);
|
||||
using AccountRankingFn = int (APS5_VABI*)(int, std::uint32_t, const std::uint64_t*, std::uint64_t, void*, std::uint64_t, void*, std::uint64_t, void*, std::uint64_t, std::uint64_t, void*, void*, void*);
|
||||
using RangeFn = int (APS5_VABI*)(int, std::uint32_t, std::uint32_t, void*, std::uint64_t, void*, std::uint64_t, void*, std::uint64_t, std::uint64_t, void*, void*, void*);
|
||||
using FriendsFn = int (APS5_VABI*)(int, std::uint32_t, int, void*, std::uint64_t, void*, std::uint64_t, void*, std::uint64_t, std::uint64_t, void*, void*, const NpScoreFriendRankingOption*);
|
||||
using GameDataFn = int (APS5_VABI*)(int, std::uint32_t, const void*, std::uint64_t*, std::uint64_t, void*, void*);
|
||||
@@ -242,8 +243,8 @@ void CheckRangeAndFriendsA() {
|
||||
}
|
||||
|
||||
void CheckAccountIds() {
|
||||
const auto byAccountId = Resolve<RankingFn>("sceNpScoreGetRankingByAccountId");
|
||||
const auto byAccountIdAsync = Resolve<RankingFn>("sceNpScoreGetRankingByAccountIdAsync");
|
||||
const auto byAccountId = Resolve<AccountRankingFn>("sceNpScoreGetRankingByAccountId");
|
||||
const auto byAccountIdAsync = Resolve<AccountRankingFn>("sceNpScoreGetRankingByAccountIdAsync");
|
||||
const auto byAccountIdPcId = Resolve<RankingFn>("sceNpScoreGetRankingByAccountIdPcId");
|
||||
const auto byAccountIdPcIdAsync = Resolve<RankingFn>("sceNpScoreGetRankingByAccountIdPcIdAsync");
|
||||
int req = NewRequest();
|
||||
@@ -341,8 +342,8 @@ void CheckCrossSave() {
|
||||
const auto byRangeAsync = Resolve<RangeFn>("sceNpScoreGetRankingByRangeForCrossSaveAsync");
|
||||
const auto friends = Resolve<FriendsFn>("sceNpScoreGetFriendsRankingForCrossSave");
|
||||
const auto friendsAsync = Resolve<FriendsFn>("sceNpScoreGetFriendsRankingForCrossSaveAsync");
|
||||
const auto byAccountId = Resolve<RankingFn>("sceNpScoreGetRankingByAccountIdForCrossSave");
|
||||
const auto byAccountIdAsync = Resolve<RankingFn>("sceNpScoreGetRankingByAccountIdForCrossSaveAsync");
|
||||
const auto byAccountId = Resolve<AccountRankingFn>("sceNpScoreGetRankingByAccountIdForCrossSave");
|
||||
const auto byAccountIdAsync = Resolve<AccountRankingFn>("sceNpScoreGetRankingByAccountIdForCrossSaveAsync");
|
||||
const auto byAccountIdPcId = Resolve<RankingFn>("sceNpScoreGetRankingByAccountIdPcIdForCrossSave");
|
||||
const auto byAccountIdPcIdAsync = Resolve<RankingFn>("sceNpScoreGetRankingByAccountIdPcIdForCrossSaveAsync");
|
||||
int req = NewRequest();
|
||||
|
||||
Reference in new issue
Block a user