From dcd755dabcf9ef95d6d0534c11c668f44c6f89c2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 30 Nov 2023 17:17:02 +0200 Subject: [PATCH] Fix validation of :box face attribute * src/xfaces.c (Finternal_set_lisp_face_attribute): Fix the logic of validating the :box attribute. The previous code would always allow invalid attributes of :box as long as the invalid attribute was the last in the list. (Bug#67404) --- src/xfaces.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index 96382e78397..a23f4c302ed 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3371,12 +3371,13 @@ FRAME 0 means change the face on all frames, and change the default if (!CONSP (tem)) break; v = XCAR (tem); - tem = XCDR (tem); if (EQ (k, QCline_width)) { - if ((!CONSP(v) || !FIXNUMP (XCAR (v)) || XFIXNUM (XCAR (v)) == 0 - || !FIXNUMP (XCDR (v)) || XFIXNUM (XCDR (v)) == 0) + if ((!CONSP(v) + || !FIXNUMP (XCAR (v)) + || XFIXNUM (XCAR (v)) == 0 + || !FIXNUMP (XCDR (v)) || XFIXNUM (XCDR (v)) == 0) && (!FIXNUMP (v) || XFIXNUM (v) == 0)) break; } @@ -3393,6 +3394,8 @@ FRAME 0 means change the face on all frames, and change the default } else break; + + tem = XCDR (tem); } valid_p = NILP (tem); -- 2.39.2