util_dynarray_grow_bytes divides by eltsize, but it's possible for
bundle->padding to be zero.
I changed the other call to util_dynarray_grow_bytes for consistency.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4397>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4397>
source = &scalarized;
}
- memcpy(util_dynarray_grow_bytes(emission, 1, size), source, size);
+ memcpy(util_dynarray_grow_bytes(emission, size, 1), source, size);
}
/* Emit padding (all zero) */
- memset(util_dynarray_grow_bytes(emission, 1, bundle->padding), 0, bundle->padding);
+ memset(util_dynarray_grow_bytes(emission, bundle->padding, 1), 0, bundle->padding);
/* Tack on constants */