mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 19:02:14 +02:00
More minor corrections to accountListAllUsers
This commit is contained in:
parent
01ed16ea5f
commit
bf2304f0a2
@ -112,8 +112,7 @@ static Result _accountListAllUsers(u128* userIDs)
|
|||||||
Result accountListAllUsers(u128* userIDs, size_t max_userIDs, size_t *actual_total)
|
Result accountListAllUsers(u128* userIDs, size_t max_userIDs, size_t *actual_total)
|
||||||
{
|
{
|
||||||
Result rc=0;
|
Result rc=0;
|
||||||
u128 *temp_userIDs;
|
u128 *temp_userIDs = malloc(sizeof(u128) * ACC_USER_LIST_SIZE);
|
||||||
temp_userIDs = malloc(sizeof(u128) * ACC_USER_LIST_SIZE);
|
|
||||||
|
|
||||||
rc = _accountListAllUsers(temp_userIDs);
|
rc = _accountListAllUsers(temp_userIDs);
|
||||||
|
|
||||||
@ -125,7 +124,7 @@ Result accountListAllUsers(u128* userIDs, size_t max_userIDs, size_t *actual_tot
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (max_userIDs > total_userIDs) {
|
if (max_userIDs > total_userIDs) {
|
||||||
memcpy(&max_userIDs, &total_userIDs, sizeof(size_t));
|
max_userIDs = total_userIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(userIDs, temp_userIDs, sizeof(u128) * max_userIDs);
|
memcpy(userIDs, temp_userIDs, sizeof(u128) * max_userIDs);
|
||||||
|
Loading…
Reference in New Issue
Block a user