summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderManager.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2016-05-07 09:35:40 +0200
committerdegasus <wickmarkus@web.de>2016-09-17 16:47:12 +0200
commit258f48572deda4bedd776dd7e11584e9c252c61d (patch)
treee785be4317e058c123433d2d2458d3e4ba3aeca0 /Source/Core/VideoCommon/VertexLoaderManager.cpp
parent22b5d89bf15e22de63264771c1f373519ea5cc25 (diff)
VertexLoaderJit: Fix out-of-bounds access for zfreeze.
This fixes a GCC6.1 warning.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoaderManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp
index e9c4533244..6579802445 100644
--- a/Source/Core/VideoCommon/VertexLoaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp
@@ -28,7 +28,10 @@
namespace VertexLoaderManager
{
float position_cache[3][4];
-u32 position_matrix_index[3];
+
+// The counter added to the address of the array is 1, 2, or 3, but never zero.
+// So only index 1 - 3 are used.
+u32 position_matrix_index[4];
static NativeVertexFormatMap s_native_vertex_map;
static NativeVertexFormat* s_current_vtx_fmt;