mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 01:18:06 +02:00
vbo: fix incorrect loop limit in bind_array_obj()
The generic_array[] is 16 elements in size, but the loop was doing 32 iterations. The out of bounds array write was clobbering the following inputs[] array but as luck would have it, that didn't matter.
This commit is contained in:
parent
d4fb7615b5
commit
8da09e6924
1 changed files with 4 additions and 1 deletions
|
|
@ -118,8 +118,11 @@ static void bind_array_obj( GLcontext *ctx )
|
|||
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++)
|
||||
exec->array.legacy_array[VERT_ATTRIB_TEX0 + i] = &arrayObj->TexCoord[i];
|
||||
|
||||
for (i = 0; i < VERT_ATTRIB_MAX; i++)
|
||||
for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) {
|
||||
assert(i < Elements(arrayObj->VertexAttrib));
|
||||
assert(i < Elements(exec->array.generic_array));
|
||||
exec->array.generic_array[i] = &arrayObj->VertexAttrib[i];
|
||||
}
|
||||
|
||||
exec->array.array_obj = arrayObj->Name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue