diff options
author | smatz <smatz@openttd.org> | 2008-05-18 20:01:54 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-05-18 20:01:54 +0000 |
commit | 23b98524800ef62ee4baf02ef9b5ed4823cdad00 (patch) | |
tree | 18fb051e06f4a52c315bb893aa338c9ea47c493e /src | |
parent | 97293e5cbb7e7e1cef20119f166ca86d5c241378 (diff) | |
download | openttd-23b98524800ef62ee4baf02ef9b5ed4823cdad00.tar.xz |
(svn r13168) -Fix (r13072): forgot to 'fix' EngList_SortPartial() together with EngList_Sort()
Diffstat (limited to 'src')
-rw-r--r-- | src/engine.cpp | 1 |
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); } |