From a6830e61b885bb181cbf2f8add82fdd980221002 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 28 Oct 2018 18:11:17 -0400 Subject: configure_system: Contrain profile usernames to 32 characters Previously, we would let a user enter an unbounded name and then silently truncate away characters that went over the 32-character limit. This is kind of bad from the UX point of view, because we're essentially not doing what the user intended in certain scenarios. Instead, we clamp it to 32 characters and make that visually apparent in the dialog box to provide a name for a user. --- src/core/hle/service/acc/profile_manager.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/acc') diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index 1cd2e51b2..747c46c20 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h @@ -57,7 +57,8 @@ struct UUID { }; static_assert(sizeof(UUID) == 16, "UUID is an invalid size!"); -using ProfileUsername = std::array; +constexpr std::size_t profile_username_size = 32; +using ProfileUsername = std::array; using ProfileData = std::array; using UserIDArray = std::array; -- cgit v1.2.3