From c6a27b9a8866dcc61c4b7859aac547859b80decd Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 18 Jun 2019 20:11:07 -0700 Subject: logcount: crash in 64 bit build. * arith.c (logcount): NUM case doesn't have a return statement in 64 bit build, statement causing fall-through to BGNUM case where the integer object is treated as a bignum. This bug has existed in the function ab initio. --- arith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arith.c b/arith.c index fd8d4a23..fdb294b7 100644 --- a/arith.c +++ b/arith.c @@ -3425,10 +3425,10 @@ val logcount(val n) d = ((d & 0xF0F0F0F0) >> 4) + (d & 0x0F0F0F0F); d = ((d & 0xFF00FF00) >> 8) + (d & 0x00FF00FF); d = ((d & 0xFFFF0000) >> 16) + (d & 0x0000FFFF); - return unum(d); #else #error portme #endif + return unum(d); } case BGNUM: { -- cgit v1.2.3