summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-07-14 00:48:07 -0400
committerLioncash <mathew1800@gmail.com>2014-07-14 00:48:14 -0400
commitb66eb03b2f26eecfd84650cebbc7d864a66fc15d (patch)
treeb5c805990eb80bb33556c69656f471d6733310d9 /Source/Core
parentdee6f226a398d29d4dac2003991bce4d13918863 (diff)
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"
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoBackends/OGL/TextureConverter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/OGL/TextureConverter.cpp b/Source/Core/VideoBackends/OGL/TextureConverter.cpp
index f4300db292..055a1e6d7c 100644
--- a/Source/Core/VideoBackends/OGL/TextureConverter.cpp
+++ b/Source/Core/VideoBackends/OGL/TextureConverter.cpp
@@ -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];