From 012d09e4d51ad6b8988dbe7508b254dbb1327e8f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 3 Jun 2019 06:15:33 -0700 Subject: arith: INT_PTR_MIN overflow bugfix. * arith.c (int_flo): Don't subtract one from INT_PTR_MIN any more, since it is now the most negative integer already. --- arith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arith.c b/arith.c index be620755..c60835a3 100644 --- a/arith.c +++ b/arith.c @@ -2743,7 +2743,7 @@ val int_flo(val f) val self = lit("int-flo"); double d = c_flo(f, self); - if (d >= INT_PTR_MIN - 1 && d <= INT_PTR_MAX) { + if (d >= INT_PTR_MIN && d <= INT_PTR_MAX) { cnum n = d; if (n < NUM_MIN || n > NUM_MAX) return bignum(n); -- cgit v1.2.3