mirror of https://github.com/OpenTTD/OpenTTD
(svn r3154) - Fix: Last value of an array is lengthof-1; let's keep this at a typo, shall we :P
parent
947fc8a8ec
commit
723e789b2f
|
@ -919,7 +919,7 @@ static const StringID _endgame_perf_titles[16] = {
|
||||||
StringID EndGameGetPerformanceTitleFromValue(uint value)
|
StringID EndGameGetPerformanceTitleFromValue(uint value)
|
||||||
{
|
{
|
||||||
value = minu(value, 1000) >> 6;
|
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];
|
return _endgame_perf_titles[value];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue