- 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
parent d7b7ae06e7
commit e4fd6ee03f

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);
}