From 29a7d73d195761e8309a4fe23872888758436d1e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Jul 2019 08:29:21 -0400 Subject: [PATCH] * src/fns.c (hashfn_user_defined): Make sure we always return a fixnum. --- src/fns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fns.c b/src/fns.c index d28d437df9c..f4f3b95ac64 100644 --- a/src/fns.c +++ b/src/fns.c @@ -4023,7 +4023,7 @@ hashfn_user_defined (Lisp_Object key, struct Lisp_Hash_Table *h) { Lisp_Object args[] = { h->test.user_hash_function, key }; Lisp_Object hash = hash_table_user_defined_call (ARRAYELTS (args), args, h); - return BIGNUMP (hash) ? make_fixnum (sxhash_bignum (XBIGNUM (hash))) : hash; + return FIXNUMP (hash) ? hash : make_fixnum (sxhash (hash, 0)); } struct hash_table_test const -- 2.39.2