From: Richard M. Stallman Date: Mon, 13 Jan 1997 03:33:26 +0000 (+0000) Subject: (concat): Take modulus of thisindex before shifting. X-Git-Tag: emacs-20.1~3081 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de712da3be4b586a962c50b78decfa1fa279478b;p=emacs.git (concat): Take modulus of thisindex before shifting. Declare thisindex as unsigned. --- diff --git a/src/fns.c b/src/fns.c index 1c7a98cae46..7991403eea4 100644 --- a/src/fns.c +++ b/src/fns.c @@ -409,7 +409,7 @@ concat (nargs, args, target_type, last_special) { Lisp_Object thislen; int thisleni; - register int thisindex = 0; + register unsigned int thisindex = 0; this = args[argnum]; if (!CONSP (this)) @@ -443,7 +443,7 @@ concat (nargs, args, target_type, last_special) / 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;