Mercurial > hg > openttd
changeset 9404:9fab42eb6fbb draft
(svn r13315) -Fix (r13314): Assert if no engines or wagons available
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Wed, 28 May 2008 20:06:00 +0000 |
parents | a6c2188b725a |
children | 21d848e22e41 |
files | src/engine_gui.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -214,9 +214,9 @@ */ void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items) { + if (num_items < 2) return; assert(begin < el->Length()); assert(begin + num_items <= el->Length()); - if (num_items < 2) return; qsort(el->Get(begin), num_items, sizeof(*el->Begin()), compare); }