mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-29 23:14:16 +01:00
account: Remove unnecessary null termination
This commit is contained in:
parent
1f282af87e
commit
392a1ac437
@ -28,9 +28,8 @@ namespace skyline::service::account {
|
|||||||
};
|
};
|
||||||
|
|
||||||
auto username = state.settings->GetString("username_value");
|
auto username = state.settings->GetString("username_value");
|
||||||
size_t usernameSize = std::min(accountProfileBase.nickname.size(), username.size());
|
size_t usernameSize = std::min(accountProfileBase.nickname.size() - 1, username.size());
|
||||||
std::memcpy(accountProfileBase.nickname.data(), username.c_str(), usernameSize);
|
std::memcpy(accountProfileBase.nickname.data(), username.c_str(), usernameSize);
|
||||||
accountProfileBase.nickname[accountProfileBase.nickname.size() - 1] = '\0';
|
|
||||||
|
|
||||||
auto userData = state.process->GetPointer<AccountUserData>(request.outputBuf.at(0).address);
|
auto userData = state.process->GetPointer<AccountUserData>(request.outputBuf.at(0).address);
|
||||||
userData->iconBackgroundColorID = 0x1; // Color indexing starts at 0x1
|
userData->iconBackgroundColorID = 0x1; // Color indexing starts at 0x1
|
||||||
|
Loading…
Reference in New Issue
Block a user