diff --git a/src/Components/Modules/Friends.cpp b/src/Components/Modules/Friends.cpp index 23dc60cf..5f29daa9 100644 --- a/src/Components/Modules/Friends.cpp +++ b/src/Components/Modules/Friends.cpp @@ -13,7 +13,7 @@ namespace Components void Friends::SortIndividualList(std::vector* list) { - std::sort(list->begin(), list->end(), [](Friends::Friend const& friend1, Friends::Friend const& friend2) + std::stable_sort(list->begin(), list->end(), [](Friends::Friend const& friend1, Friends::Friend const& friend2) { return friend1.cleanName.compare(friend2.cleanName) < 0; }); diff --git a/src/Components/Modules/ServerList.cpp b/src/Components/Modules/ServerList.cpp index 5599485c..f4c141ba 100644 --- a/src/Components/Modules/ServerList.cpp +++ b/src/Components/Modules/ServerList.cpp @@ -558,7 +558,7 @@ namespace Components Game::menuDef_t* menu = Game::Menus_FindByName(Game::uiContext, "pc_join_unranked"); if (!menu || !Game::Menu_IsVisible(Game::uiContext, menu)) return; - std::sort(ServerList::VisibleList.begin(), ServerList::VisibleList.end(), [](const unsigned int &server1, const unsigned int &server2) -> bool + std::stable_sort(ServerList::VisibleList.begin(), ServerList::VisibleList.end(), [](const unsigned int &server1, const unsigned int &server2) -> bool { ServerInfo* info1 = nullptr; ServerInfo* info2 = nullptr;