mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 14:50:11 +01:00
mesa: fix a oldNum typo in reallocation in _mesa_reserve_parameter_storage
oldNum was incorrect. oldValNum is the correct number of elements to copy inside realloc. (oldNum is for Parameters, not ParameterValues) Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360>
This commit is contained in:
parent
aa748ef7e5
commit
e91dec36bc
1 changed files with 1 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ _mesa_reserve_parameter_storage(struct gl_program_parameter_list *paramList,
|
|||
|
||||
paramList->ParameterValues = (gl_constant_value *)
|
||||
align_realloc(paramList->ParameterValues, /* old buf */
|
||||
oldNum * 4 * sizeof(gl_constant_value),/* old sz */
|
||||
oldValNum * 4 * sizeof(gl_constant_value),/* old sz */
|
||||
/* Overallocate the size by 12 because matrix rows can
|
||||
* be allocated partially but fetch_state always writes
|
||||
* 4 components (16 bytes).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue