summaryrefslogtreecommitdiff
path: root/src/engine.cpp
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
commit23b98524800ef62ee4baf02ef9b5ed4823cdad00 (patch)
tree18fb051e06f4a52c315bb893aa338c9ea47c493e /src/engine.cpp
parent97293e5cbb7e7e1cef20119f166ca86d5c241378 (diff)
downloadopenttd-23b98524800ef62ee4baf02ef9b5ed4823cdad00.tar.xz
(svn r13168) -Fix (r13072): forgot to 'fix' EngList_SortPartial() together with EngList_Sort()
Diffstat (limited to 'src/engine.cpp')
-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);
}