summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-11-07 17:31:21 +0000
committerDarkvater <darkvater@openttd.org>2005-11-07 17:31:21 +0000
commit723e789b2f1ac1d6f8eaa122d9626f41595c51cf (patch)
treee60074d0dad1955695b09e35d5644f9d2ee2e786
parent947fc8a8ec7eec13b0c405b4019c068706b5f3cf (diff)
downloadopenttd-723e789b2f1ac1d6f8eaa122d9626f41595c51cf.tar.xz
(svn r3154) - Fix: Last value of an array is lengthof-1; let's keep this at a typo, shall we :P
-rw-r--r--players.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/players.c b/players.c
index df1043619..59ad5bf36 100644
--- a/players.c
+++ b/players.c
@@ -919,7 +919,7 @@ static const StringID _endgame_perf_titles[16] = {
StringID EndGameGetPerformanceTitleFromValue(uint value)
{
value = minu(value, 1000) >> 6;
- if (value >= lengthof(_endgame_perf_titles)) value = lengthof(_endgame_perf_titles);
+ if (value >= lengthof(_endgame_perf_titles)) value = lengthof(_endgame_perf_titles) - 1;
return _endgame_perf_titles[value];
}