From f84a6e71fe8406b20fe0829221d5d3ae95afa7e2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 7 Dec 2004 21:11:59 +0000 Subject: [PATCH] (factor): Don't list 1 as a factor of 1. Problem reported by Thomas Folz-Donahue. --- src/factor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/factor.c b/src/factor.c index 9a30ce7718..4b8f39ced3 100644 --- a/src/factor.c +++ b/src/factor.c @@ -101,7 +101,7 @@ factor (uintmax_t n0, size_t max_n_factors, uintmax_t *factors) size_t n_factors = 0; unsigned char const *w = wheel_tab; - if (n < 1) + if (n <= 1) return n_factors; /* The exit condition in the following loop is correct because -- 2.47.2