(concat): Take modulus of thisindex before shifting.
Declare thisindex as unsigned.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user