Metal: prevent OOB write in MetalRenderer()

`m_uniformBufferOffsets` is sized to `METAL_GENERAL_SHADER_TYPE_TOTAL`
This commit is contained in:
Fabio Arnold 2026-03-18 21:40:19 +01:00
parent 2ec9c00dc6
commit 9870810c65

View File

@ -236,7 +236,7 @@ MetalRenderer::MetalRenderer()
for (uint32 i = 0; i < MAX_MTL_VERTEX_BUFFERS; i++)
m_state.m_vertexBufferOffsets[i] = INVALID_OFFSET;
for (uint32 i = 0; i < METAL_SHADER_TYPE_TOTAL; i++)
for (uint32 i = 0; i < METAL_GENERAL_SHADER_TYPE_TOTAL; i++)
{
for (uint32 j = 0; j < MAX_MTL_BUFFERS; j++)
m_state.m_uniformBufferOffsets[i][j] = INVALID_OFFSET;