From dc4a3ae632a8e4ac5303680d344dc63111ccb057 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 1 Feb 2008 09:20:07 +0000 Subject: [PATCH] fix broken table length, and yet another hardcoded index git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8061 d7cf8633-e32d-0410-b094-e92efae38249 --- menu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menu.c b/menu.c index 2cdae63c..7751e588 100644 --- 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); -- 2.39.2