about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-07-29 18:02:10 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-07-29 18:02:10 +0000
commit1744f7966cce2ee43aa86ca17c75119b79741ca0 (patch)
tree31c4eec01f7f2ea7d4feb396661946d8dc6db044 /src/game/client
parent2cb87d92bae27a240b938829d20249201cbb8712 (diff)
downloadzcatch-1744f7966cce2ee43aa86ca17c75119b79741ca0.tar.gz
zcatch-1744f7966cce2ee43aa86ca17c75119b79741ca0.zip
fixed error when having low number of video modes.
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/menu.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/client/menu.cpp b/src/game/client/menu.cpp
index 1f9857a8..9046d44a 100644
--- a/src/game/client/menu.cpp
+++ b/src/game/client/menu.cpp
@@ -867,6 +867,9 @@ static int settings_video_render_select_mode()
 	for (int i = 0; i < 7; i++)
 	{
 		int index = i + scroll_index;
+		if(index >= num_modes)
+			break;
+			
 		//key_thing key = keys[i + scroll_index];
 		int depth = modes[index].red+modes[index].green+modes[index].blue;
 		if(depth < 16)