From 9adda635b05e0cf816f43a5f8ffe32c3c795932f Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Sat, 20 Jun 2020 14:52:15 +0000 Subject: [PATCH] Add missing parens around inline assignment. Fixes +vid_* options in VID_Start git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12707 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_shared.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vid_shared.c b/vid_shared.c index 7de32d12..98287ece 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -1508,24 +1508,24 @@ void VID_Start(void) // interpret command-line parameters vid_commandlinecheck = false; // COMMANDLINEOPTION: Video: -window performs +vid_fullscreen 0 - if (COM_CheckParm("-window") || COM_CheckParm("-safe") || (i = COM_CheckParm("+vid_fullscreen") != 0 && atoi(sys.argv[i+1]) == 0)) + if (COM_CheckParm("-window") || COM_CheckParm("-safe") || ((i = COM_CheckParm("+vid_fullscreen")) != 0 && atoi(sys.argv[i+1]) == 0)) Cvar_SetValueQuick(&vid_fullscreen, false); // COMMANDLINEOPTION: Video: -borderless performs +vid_borderless 1 - if (COM_CheckParm("-borderless") || (i = COM_CheckParm("+vid_borderless") != 0 && atoi(sys.argv[i+1]) == 1)) + if (COM_CheckParm("-borderless") || ((i = COM_CheckParm("+vid_borderless")) != 0 && atoi(sys.argv[i+1]) == 1)) { Cvar_SetValueQuick(&vid_borderless, true); Cvar_SetValueQuick(&vid_fullscreen, false); } // COMMANDLINEOPTION: Video: -fullscreen performs +vid_fullscreen 1 - if (COM_CheckParm("-fullscreen") || (i = COM_CheckParm("+vid_fullscreen") != 0 && atoi(sys.argv[i+1]) == 1)) + if (COM_CheckParm("-fullscreen") || ((i = COM_CheckParm("+vid_fullscreen")) != 0 && atoi(sys.argv[i+1]) == 1)) Cvar_SetValueQuick(&vid_fullscreen, true); width = 0; height = 0; // COMMANDLINEOPTION: Video: -width performs +vid_width and also +vid_height if only -width is specified (example: -width 1024 sets 1024x768 mode) - if ((i = COM_CheckParm("-width")) != 0 || (i = COM_CheckParm("+vid_width") != 0)) + if ((i = COM_CheckParm("-width")) != 0 || ((i = COM_CheckParm("+vid_width")) != 0)) width = atoi(sys.argv[i+1]); // COMMANDLINEOPTION: Video: -height performs +vid_height and also +vid_width if only -height is specified (example: -height 768 sets 1024x768 mode) - if ((i = COM_CheckParm("-height")) != 0 || (i = COM_CheckParm("+vid_height") != 0)) + if ((i = COM_CheckParm("-height")) != 0 || ((i = COM_CheckParm("+vid_height")) != 0)) height = atoi(sys.argv[i+1]); if (width == 0) width = height * 4 / 3; -- 2.39.2