- the error checking on the previous commit should've been done slightly differently

This commit is contained in:
Rachael Alexanderson 2018-07-21 21:51:37 -04:00 committed by drfrag666
parent 9b26fba11b
commit 75a8c4da3e

View file

@ -28,7 +28,6 @@
#define NUMSCALEMODES 6
EXTERN_CVAR(Int, vid_scalemode)
EXTERN_CVAR(Int, vid_aspect)
CVAR(Int, vid_scale_customwidth, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Int, vid_scale_customheight, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
@ -58,7 +57,7 @@ namespace
};
bool isOutOfBounds(int x)
{
if (vScaleTable[vid_scalemode].isCustom)
if (vScaleTable[x].isCustom)
return ((vid_scale_customwidth < 80) || (vid_scale_customheight < 50));
return (x < 0 || x >= NUMSCALEMODES || vScaleTable[x].isValid == false);
}