emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 3c46ac7: Fix bug: Range-check integer ‘alpha’ fram


From: Thien-Thi Nguyen
Subject: [Emacs-diffs] master 3c46ac7: Fix bug: Range-check integer ‘alpha’ frame parm value
Date: Fri, 17 Mar 2017 05:38:36 -0400 (EDT)

branch: master
commit 3c46ac7d65bfa54db540d228552245b4b6d01e94
Author: Thien-Thi Nguyen <address@hidden>
Commit: Thien-Thi Nguyen <address@hidden>

    Fix bug: Range-check integer ‘alpha’ frame parm value
    
    Typo introduced 2013-04-01, "Prefer < to >
    in range checks such as 0 <= i && i < N".
    
    * src/frame.c (x_set_alpha): Use ‘ialpha’, not ‘alpha’.
---
 src/frame.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/frame.c b/src/frame.c
index 5e1e2f1..162b203 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3990,7 +3990,7 @@ x_set_alpha (struct frame *f, Lisp_Object arg, 
Lisp_Object oldval)
       else if (INTEGERP (item))
        {
          EMACS_INT ialpha = XINT (item);
-         if (! (0 <= ialpha && alpha <= 100))
+         if (! (0 <= ialpha && ialpha <= 100))
            args_out_of_range (make_number (0), make_number (100));
          alpha = ialpha / 100.0;
        }



reply via email to

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