GPUShaderInterface: Fix out of bound reads

This commit is contained in:
Clément Foucault 2020-06-02 22:35:37 +02:00
parent ee4bafc63a
commit 47eccac21c
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ GPUShaderInterface *GPU_shaderinterface_create(int32_t program)
}
if (shaderface->enabled_tex_mask > 0) {
printf("Samplers {\n");
for (int i = 0; i < shaderface->ubo_len; i++) {
for (int i = 0; i < shaderface->uniform_len; i++) {
GPUShaderInput *input = shaderface->inputs + shaderface->attribute_len +
shaderface->ubo_len + i;
if (input->binding != -1) {