diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-10-31 09:40:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-10-31 09:40:48 -0700 |
commit | 75582a6861d8ae7867bd5acf426178089cd40505 (patch) | |
tree | e7b64716b57fb66abbd42ec05c0da09b73e21201 /lib.c | |
parent | 7cc607aa306baf0addad45d7350a771237971943 (diff) | |
download | txr-75582a6861d8ae7867bd5acf426178089cd40505.tar.gz txr-75582a6861d8ae7867bd5acf426178089cd40505.tar.bz2 txr-75582a6861d8ae7867bd5acf426178089cd40505.zip |
* 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.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); } |