Fix memcpy size in 'merge_faces'

* src/xfaces.c (merge_faces): Use 'sizeof lface_attrs' instead of
LFACE_VECTOR_SIZE as the 'memcpy' size argument.  (Bug#81224)
This commit is contained in:
Andrea Alberti 2026-06-11 17:08:35 +02:00 committed by Eli Zaretskii
parent 2c6a03b08c
commit 4a3d5b110e

View file

@ -7229,7 +7229,7 @@ merge_faces (struct window *w, Lisp_Object face_name, int face_id,
Lisp_Object lface_attrs[LFACE_VECTOR_SIZE];
int i;
memcpy (lface_attrs, face->lface, LFACE_VECTOR_SIZE);
memcpy (lface_attrs, face->lface, sizeof lface_attrs);
/* Make explicit any attributes whose value is 'reset'. */
for (i = 1; i < LFACE_VECTOR_SIZE; i++)
if (EQ (lface_attrs[i], Qreset))