]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix broken table length, and yet another hardcoded index
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 1 Feb 2008 09:20:07 +0000 (09:20 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 1 Feb 2008 09:20:07 +0000 (09:20 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8061 d7cf8633-e32d-0410-b094-e92efae38249

menu.c

diff --git a/menu.c b/menu.c
index 2cdae63c57358e2e7c332acfeefa4f19d974d31a..7751e58839e8f44ee37c775b65583e1f2471bc4e 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -2793,9 +2793,9 @@ video_resolution_t video_resolutions[] =
 #define VID_DEFAULT 3
 #define VID_RES_COUNT ((int)(sizeof(video_resolutions) / sizeof(video_resolutions[0])) - 1)
 
-#define VIDEO_ITEMS 10
+#define VIDEO_ITEMS 11
 static int video_cursor = 0;
-static int video_cursor_table[] = {56, 68, 88, 100, 108, 116, 136, 166, 174, 182, 190};
+static int video_cursor_table[VIDEO_ITEMS] = {56, 68, 88, 100, 108, 116, 136, 166, 174, 182, 190};
 static int video_resolution;
 
 void M_Menu_Video_f (void)
@@ -2973,7 +2973,7 @@ static void M_Video_Key (int key, char ascii)
                        m_entersound = true;
                        switch (video_cursor)
                        {
-                               case 5:
+                               case 6:
                                        Cvar_SetValueQuick (&vid_width, video_resolutions[video_resolution].width);
                                        Cvar_SetValueQuick (&vid_height, video_resolutions[video_resolution].height);
                                        Cvar_SetValueQuick (&vid_conwidth, video_resolutions[video_resolution].conwidth);