From bf2304f0a2a74f67c811f7c9c221a2088c3f9bdf Mon Sep 17 00:00:00 2001 From: 3Daniel Date: Fri, 29 Jun 2018 07:46:51 +1200 Subject: [PATCH] More minor corrections to accountListAllUsers --- nx/source/services/acc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nx/source/services/acc.c b/nx/source/services/acc.c index 71e7e4c4..8108ed17 100644 --- a/nx/source/services/acc.c +++ b/nx/source/services/acc.c @@ -112,8 +112,7 @@ static Result _accountListAllUsers(u128* userIDs) Result accountListAllUsers(u128* userIDs, size_t max_userIDs, size_t *actual_total) { Result rc=0; - u128 *temp_userIDs; - temp_userIDs = malloc(sizeof(u128) * ACC_USER_LIST_SIZE); + u128 *temp_userIDs = malloc(sizeof(u128) * ACC_USER_LIST_SIZE); 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) { - memcpy(&max_userIDs, &total_userIDs, sizeof(size_t)); + max_userIDs = total_userIDs; } memcpy(userIDs, temp_userIDs, sizeof(u128) * max_userIDs);