diff options
author | pcpa <paulo.cesar.pereira.de.andrade@gmail.com> | 2012-05-24 15:26:50 -0300 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-05-31 23:00:34 -0700 |
commit | 63c70c830c79f0b4cfc0f7393662a9cb1169973e (patch) | |
tree | 9d68dc0b5c22af5da916854627566be8b7d78d48 /lisp/read.c | |
parent | c110109f1710758d7c87c05720bdff4df316fc7d (diff) |
Correct 64 bit overflow check and bignum code.
Signed-off-by: pcpa <paulo.cesar.pereira.de.andrade@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'lisp/read.c')
-rw-r--r-- | lisp/read.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lisp/read.c b/lisp/read.c index 9c70b64..a49e240 100644 --- a/lisp/read.c +++ b/lisp/read.c @@ -1474,9 +1474,7 @@ LispParseNumber(char *str, int radix, LispObj *read__stream, int read__line) integer = strtol(str, NULL, radix); /* if does not fit in a long */ - if (errno == ERANGE && - ((*str == '-' && integer == LONG_MIN) || - (*str != '-' && integer == LONG_MAX))) { + if (errno == ERANGE) { bignum = LispMalloc(sizeof(mpi)); mpi_init(bignum); mpi_setstr(bignum, str, radix); |