From 75582a6861d8ae7867bd5acf426178089cd40505 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 31 Oct 2012 09:40:48 -0700 Subject: * lib.c (int_str): Fix gaping bug introduced by previous commit, which could have been caught by running the regression test suite. The revised function was returning small integers as bignums. --- lib.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib.c') diff --git a/lib.c b/lib.c index b2c2f0d5..a9138199 100644 --- a/lib.c +++ b/lib.c @@ -2125,6 +2125,9 @@ val int_str(val str, val base) return (LONG_MAX < NUM_MAX) ? normalize(bignum) : bignum; } + if (value >= NUM_MIN && value <= NUM_MAX) + return num(value); + return bignum_from_long(value); } -- cgit v1.2.3