summaryrefslogtreecommitdiff
path: root/src/xselect.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-08-28 09:51:49 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-08-28 09:52:12 -0700
commit5cb057a854a848be85dc2b81f6497964f5a93dbb (patch)
treea140c670a5a1b91eb3191eb55ca2fc1cca5039f6 /src/xselect.c
parentc39ca701d3ffa3a7fcb987170436ad441e8f8ad6 (diff)
downloademacs-5cb057a854a848be85dc2b81f6497964f5a93dbb.tar.gz
Fix Fnatnump typos
Problem reported by Glenn Morris in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00946.html * src/floatfns.c (Fexpt): * src/xselect.c (cons_to_x_long): Don't assume Lisp_Object values are scalars.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 4b28d474a03..53e788523cc 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1693,7 +1693,7 @@ static unsigned long
cons_to_x_long (Lisp_Object obj)
{
if (X_ULONG_MAX <= INTMAX_MAX
- || !Fnatnump (CONSP (obj) ? XCAR (obj) : obj))
+ || NILP (Fnatnump (CONSP (obj) ? XCAR (obj) : obj)))
return cons_to_signed (obj, X_LONG_MIN, min (X_ULONG_MAX, INTMAX_MAX));
else
return cons_to_unsigned (obj, X_ULONG_MAX);