(svn r13315) -Fix (r13314): Assert if no engines or wagons available

This commit is contained in:
peter1138 2008-05-28 20:06:00 +00:00
parent f954a93ee0
commit 53aebc84c6
1 changed files with 1 additions and 1 deletions

View File

@ -214,9 +214,9 @@ void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare)
*/
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);
}