mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 22:29:21 +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
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue