(svn r3154) - Fix: Last value of an array is lengthof-1; let's keep this at a typo, shall we :P
authorDarkvater
Mon, 07 Nov 2005 17:31:21 +0000
changeset 2616 e47170379049
parent 2615 4f6f464ba3eb
child 2617 a9e1a187de99
(svn r3154) - Fix: Last value of an array is lengthof-1; let's keep this at a typo, shall we :P
players.c
--- a/players.c	Mon Nov 07 16:19:45 2005 +0000
+++ b/players.c	Mon Nov 07 17:31:21 2005 +0000
@@ -919,7 +919,7 @@
 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];
 }