Fix #4215: Multiplayer, default group does not work correctly with group IDs

This commit is contained in:
Yaroslav Tretyakov 2016-08-08 02:01:52 -06:00 committed by Ted John
parent 0fbdcbe62d
commit c967114463
1 changed files with 1 additions and 1 deletions

View File

@ -886,7 +886,7 @@ void Network::LoadGroups()
}
json_t * jsonDefaultGroup = json_object_get(json, "default_group");
default_group = (uint8)json_integer_value(jsonDefaultGroup);
if (default_group >= group_list.size()) {
if (GetGroupByID(default_group) == nullptr) {
default_group = 0;
}
json_decref(json);