From: Eli Zaretskii Date: Thu, 30 Nov 2023 15:17:02 +0000 (+0200) Subject: Fix validation of :box face attribute X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dcd755dabcf9ef95d6d0534c11c668f44c6f89c2;p=emacs.git 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) --- 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);