OGL: Correctly guard against array bounds of s_encodingPrograms

s_encodingPrograms is defined as an array with a length of 64
NUM_ENCODING_PROGRAMS is also defined as 64.

However 64 is out of bounds, so we want to be comparing for "equal to or
greater than here"
This commit is contained in:
Lioncash 2014-07-14 00:48:07 -04:00
parent dee6f226a3
commit b66eb03b2f

View file

@ -134,7 +134,7 @@ static void CreatePrograms()
static SHADER &GetOrCreateEncodingShader(u32 format)
{
if (format > NUM_ENCODING_PROGRAMS)
if (format >= NUM_ENCODING_PROGRAMS)
{
PanicAlert("Unknown texture copy format: 0x%x\n", format);
return s_encodingPrograms[0];