summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-06-18 20:11:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-06-18 20:11:07 -0700
commitc6a27b9a8866dcc61c4b7859aac547859b80decd (patch)
tree08f3d93c853d550cb1c9dd563b00851a653e1641
parentd3aa4933b780e3fbb81d6acacbce0979da6a7f39 (diff)
downloadtxr-c6a27b9a8866dcc61c4b7859aac547859b80decd.tar.gz
txr-c6a27b9a8866dcc61c4b7859aac547859b80decd.tar.bz2
txr-c6a27b9a8866dcc61c4b7859aac547859b80decd.zip
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.
-rw-r--r--arith.c2
1 files changed, 1 insertions, 1 deletions
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:
{