# HG changeset patch # User Richard M. Stallman # Date 853126406 0 # Node ID 591b7a95d7a50ff618c0e85b5ca17736b6b4964e # Parent 7417db9e3f617a623d3da3ad174d304d0be79c46 (concat): Take modulus of thisindex before shifting. Declare thisindex as unsigned. diff -r 7417db9e3f61 -r 591b7a95d7a5 src/fns.c --- a/src/fns.c Mon Jan 13 03:25:05 1997 +0000 +++ b/src/fns.c Mon Jan 13 03:33:26 1997 +0000 @@ -409,7 +409,7 @@ { Lisp_Object thislen; int thisleni; - register int thisindex = 0; + register unsigned int thisindex = 0; this = args[argnum]; if (!CONSP (this)) @@ -443,7 +443,7 @@ / BITS_PER_CHAR); int byte; byte = XBOOL_VECTOR (val)->data[thisindex / BITS_PER_CHAR]; - if (byte & (1 << thisindex)) + if (byte & (1 << (thisindex % BITS_PER_CHAR))) elt = Qt; else elt = Qnil;