From de712da3be4b586a962c50b78decfa1fa279478b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 13 Jan 1997 03:33:26 +0000 Subject: [PATCH] (concat): Take modulus of thisindex before shifting. Declare thisindex as unsigned. --- src/fns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5