1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00

(concat): Take modulus of thisindex before shifting.

Declare thisindex as unsigned.
This commit is contained in:
Richard M. Stallman 1997-01-13 03:33:26 +00:00
parent 3fda54a2a2
commit de712da3be

View file

@ -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;