The bug arises when dividing by OBJECT_LENGTH inside
BIT_STRING_INDEX_TO_WORD. The division is optimized into an unsigned
left shift that works for non-negative values, but not for -1, used
when the number of bits is 0!
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/bitstr.c,v 9.45 1990/09/08 00:09:43 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/bitstr.c,v 9.46 1990/09/20 03:02:26 jinx Rel $
Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology
transferred as SCHEME_OBJECTs, and only the `head' and `tail' need be
treated specially. */
+ if (nbits == 0)
+ return;
+
if (source_offset == destination_offset)
{
if (source_offset != 0)