mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
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:
@ -134,7 +134,7 @@ static void CreatePrograms()
|
|||||||
|
|
||||||
static SHADER &GetOrCreateEncodingShader(u32 format)
|
static SHADER &GetOrCreateEncodingShader(u32 format)
|
||||||
{
|
{
|
||||||
if (format > NUM_ENCODING_PROGRAMS)
|
if (format >= NUM_ENCODING_PROGRAMS)
|
||||||
{
|
{
|
||||||
PanicAlert("Unknown texture copy format: 0x%x\n", format);
|
PanicAlert("Unknown texture copy format: 0x%x\n", format);
|
||||||
return s_encodingPrograms[0];
|
return s_encodingPrograms[0];
|
||||||
|
Reference in New Issue
Block a user