X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/6ca13db8fd03ef3d85def0d45d00f632b9d58f43..d31f4a790046b7a6ebd1099dd474908c50b947b9:/pfilt.c diff --git a/pfilt.c b/pfilt.c index 7f44569..e502404 100644 --- a/pfilt.c +++ b/pfilt.c @@ -59,7 +59,9 @@ static int smallenough(mp *m) max = mp_sqr(max, max); max->a->n--; /* Permanent allocation */ } - if (MP_CMP(m, <, max)) + if (MP_CMP(m, <=, MP_ONE)) + rc = PGEN_FAIL; + else if (MP_CMP(m, <, max)) rc = PGEN_DONE; return (rc); } @@ -91,6 +93,7 @@ int pfilt_smallfactor(mp *m) rc = PGEN_DONE; else rc = PGEN_FAIL; + break; } }