summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-05-18 20:01:54 +0000
committersmatz <smatz@openttd.org>2008-05-18 20:01:54 +0000
commit9aa69db2e6352bf81df189c70ba2719bbdc38c31 (patch)
tree18fb051e06f4a52c315bb893aa338c9ea47c493e
parent629c5ce740084d5f42ff72354523528488d063d8 (diff)
downloadopenttd-9aa69db2e6352bf81df189c70ba2719bbdc38c31.tar.xz
(svn r13168) -Fix (r13072): forgot to 'fix' EngList_SortPartial() together with EngList_Sort()
-rw-r--r--src/engine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 096721137..3f361c048 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -138,6 +138,7 @@ void EngList_SortPartial(EngineList *el, EngList_SortTypeFunction compare, uint
{
assert(begin <= (uint)el->size());
assert(begin + num_items <= (uint)el->size());
+ if (num_items < 2) return;
qsort(&((*el)[begin]), num_items, sizeof(EngineID), compare);
}