fix(Core): Fix PlayerSettingVectors (#13338)
* fix(Core): Fix PlayerSettingVectors * Fix compile warning
This commit is contained in:
parent
8d7370decf
commit
414546aeca
1 changed files with 7 additions and 0 deletions
|
|
@ -78,6 +78,13 @@ PlayerSetting Player::GetPlayerSetting(std::string source, uint8 index)
|
|||
return GetPlayerSetting(source, index);
|
||||
}
|
||||
|
||||
PlayerSettingVector settingVector = itr->second;
|
||||
if (settingVector.size() < (uint8)(index + 1))
|
||||
{
|
||||
UpdatePlayerSetting(source, index, 0);
|
||||
return GetPlayerSetting(source, index);
|
||||
}
|
||||
|
||||
return itr->second[index];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue