Fix crash when sorting by capacity in autoreplace window
Move capacity cache into GUIList sort parameter See: #690
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_list, const Scrollbar &sb, EngineID selected_id, bool show_count, GroupID selected_group);
|
||||
|
||||
static bool EngineNumberSorter(const GUIEngineListItem &a, const GUIEngineListItem &b)
|
||||
static bool EngineNumberSorter(const GUIEngineListItem &a, const GUIEngineListItem &b, const GUIEngineListSortCache &cache)
|
||||
{
|
||||
return Engine::Get(a.engine_id)->list_position < Engine::Get(b.engine_id)->list_position;
|
||||
}
|
||||
|
Reference in New Issue
Block a user