mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 17:02:40 +00:00
Revert change to data
Removes the need to type cast.
This commit is contained in:
parent
033d1ef9b6
commit
fa7da53b9b
@ -15,9 +15,7 @@ int PS4_SYSV_ABI sceNpCmpNpId(OrbisNpId* np_id1, OrbisNpId* np_id2) {
|
||||
}
|
||||
|
||||
// Compare data
|
||||
if (std::strncmp(reinterpret_cast<char*>(np_id1->handle.data),
|
||||
reinterpret_cast<char*>(np_id2->handle.data),
|
||||
ORBIS_NP_ONLINEID_MAX_LENGTH) != 0) {
|
||||
if (std::strncmp(np_id1->handle.data, np_id2->handle.data, ORBIS_NP_ONLINEID_MAX_LENGTH) != 0) {
|
||||
return ORBIS_NP_UTIL_ERROR_NOT_MATCH;
|
||||
}
|
||||
|
||||
@ -45,8 +43,7 @@ int PS4_SYSV_ABI sceNpCmpNpIdInOrder(OrbisNpId* np_id1, OrbisNpId* np_id2, u32*
|
||||
|
||||
// Compare data
|
||||
u32 compare =
|
||||
std::strncmp(reinterpret_cast<char*>(np_id1->handle.data),
|
||||
reinterpret_cast<char*>(np_id2->handle.data), ORBIS_NP_ONLINEID_MAX_LENGTH);
|
||||
std::strncmp(np_id1->handle.data, np_id2->handle.data, ORBIS_NP_ONLINEID_MAX_LENGTH);
|
||||
if (compare < 0) {
|
||||
*out_result = -1;
|
||||
return ORBIS_OK;
|
||||
@ -86,9 +83,7 @@ int PS4_SYSV_ABI sceNpCmpOnlineId(OrbisNpOnlineId* online_id1, OrbisNpOnlineId*
|
||||
return ORBIS_NP_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
if (std::strncmp(reinterpret_cast<char*>(online_id1->data),
|
||||
reinterpret_cast<char*>(online_id2->data),
|
||||
ORBIS_NP_ONLINEID_MAX_LENGTH) != 0) {
|
||||
if (std::strncmp(online_id1->data, online_id2->data, ORBIS_NP_ONLINEID_MAX_LENGTH) != 0) {
|
||||
return ORBIS_NP_UTIL_ERROR_NOT_MATCH;
|
||||
}
|
||||
return ORBIS_OK;
|
||||
|
@ -14,7 +14,7 @@ namespace Libraries::NpCommon {
|
||||
constexpr int ORBIS_NP_ONLINEID_MAX_LENGTH = 16;
|
||||
|
||||
struct OrbisNpOnlineId {
|
||||
s8 data[ORBIS_NP_ONLINEID_MAX_LENGTH];
|
||||
char data[ORBIS_NP_ONLINEID_MAX_LENGTH];
|
||||
s8 term;
|
||||
s8 dummy[3];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user