Otherwise they get reduced mod 2^large, and the program takes forever.
It's not like we'd get a better answer by using the full-on Gamma
function, so just report an error.
xx = mp_readstring(MP_NEW, argv[optind], &p, 0);
while (isspace((unsigned char)*p))
p++;
xx = mp_readstring(MP_NEW, argv[optind], &p, 0);
while (isspace((unsigned char)*p))
p++;
- if (!xx || *p || MP_CMP(xx, >, ulmax))
+ if (!xx || *p || MP_CMP(xx, <, MP_ZERO) || MP_CMP(xx, >, ulmax))
die(EXIT_FAILURE, "bad integer `%s'", argv[optind]);
x = mp_toulong(xx);
mp_drop(xx);
die(EXIT_FAILURE, "bad integer `%s'", argv[optind]);
x = mp_toulong(xx);
mp_drop(xx);