mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 21:35:28 +00: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:
parent
dee6f226a3
commit
b66eb03b2f
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user