emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master dcd755dabcf: Fix validation of :box face attribute


From: Eli Zaretskii
Subject: master dcd755dabcf: Fix validation of :box face attribute
Date: Thu, 30 Nov 2023 10:18:41 -0500 (EST)

branch: master
commit dcd755dabcf9ef95d6d0534c11c668f44c6f89c2
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]