From e8f0c500d19b963417c7cfc0a4dc3f393a8354e9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 10 Jul 2024 11:04:18 +0200 Subject: [PATCH] In timefns, call natnump only for non-fixnums * src/timefns.c (decode_time_components): Call Fnatnump only for non-fixnums, as we need to special-case 0 anyway. (cherry picked from commit 2fb7bb41bee5e39391c9abc8013bcef39782e88d) --- src/timefns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timefns.c b/src/timefns.c index ba1ba10a809..45a0930f8a8 100644 --- a/src/timefns.c +++ b/src/timefns.c @@ -895,7 +895,7 @@ decode_time_components (enum timeform form, case TIMEFORM_TICKS_HZ: if (! (INTEGERP (high) - && !NILP (Fnatnump (low)) && !BASE_EQ (low, make_fixnum (0)))) + && (FIXNUMP (low) ? 0 < XFIXNUM (low) : !NILP (Fnatnump (low))))) return (struct err_time) { .err = EINVAL }; ticks = high; hz = low; -- 2.39.2