summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2015-02-16 22:58:33 +0100
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:08 +0100
commita11fa76d13a0b4ad4575774e1fd68bde1f4097cb (patch)
tree1f6d46aff3b1ef352c2977f0d30f8b510c833303 /src/ui
parentd2ed3dc7cca33023d901b15e1606ee56c3f5bd34 (diff)
add range checks for uiInfo.resolutions
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index 9f7aacc7..8b516f05 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -3982,7 +3982,7 @@ void UI_ParseResolutions( void )
p = buf;
uiInfo.numResolutions = 0;
- while( String_Parse( &p, &out ) )
+ while( uiInfo.numResolutions < MAX_RESOLUTIONS && String_Parse( &p, &out ) )
{
Q_strncpyz( w, out, sizeof( w ) );
s = strchr( w, 'x' );