diff --git a/src/storagemanager.cpp b/src/storagemanager.cpp index 75fbd73db..02d6dc165 100644 --- a/src/storagemanager.cpp +++ b/src/storagemanager.cpp @@ -143,7 +143,9 @@ PinMappings& Storage::getProfilePinMappings() { void Storage::setProfile(const uint32_t profileNum) { + if (profileNum < 1 || profileNum > 4) return; setFunctionalPinMappings(profileNum); + this->config.gamepadOptions.profileNumber = profileNum; } void Storage::setFunctionalPinMappings(const uint32_t profileNum)