diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index ac697c66ae..4abce06c5e 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -4584,7 +4584,7 @@ uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, Sourc /* If there is some cargo left due to rounding issues distribute it among the best rated stations. */ if (amount > moving) { - std::sort(used_stations.begin(), used_stations.end(), [type](const StationInfo &a, const StationInfo &b) { + std::stable_sort(used_stations.begin(), used_stations.end(), [type](const StationInfo &a, const StationInfo &b) { return b.first->goods[type].rating < a.first->goods[type].rating; });