diff --git a/src/states_screens/create_server_screen.cpp b/src/states_screens/create_server_screen.cpp index 0c6ec62cd..0203e24d3 100644 --- a/src/states_screens/create_server_screen.cpp +++ b/src/states_screens/create_server_screen.cpp @@ -60,8 +60,12 @@ void CreateServerScreen::loadedFromFile() m_max_players_widget = getWidget("max_players"); assert(m_max_players_widget != NULL); - m_max_players_widget - ->setMax(UserConfigParams::m_server_max_players.getDefaultValue()); + int max = UserConfigParams::m_server_max_players.getDefaultValue(); + m_max_players_widget->setMax(max); + + if (UserConfigParams::m_server_max_players > max) + UserConfigParams::m_server_max_players = max; + m_max_players_widget->setValue(UserConfigParams::m_server_max_players); m_info_widget = getWidget("info");