]> git.eshelyaron.com Git - emacs.git/commitdiff
(concat): Take modulus of thisindex before shifting.
authorRichard M. Stallman <rms@gnu.org>
Mon, 13 Jan 1997 03:33:26 +0000 (03:33 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 13 Jan 1997 03:33:26 +0000 (03:33 +0000)
Declare thisindex as unsigned.

src/fns.c

index 1c7a98cae46e5089ce64ff58778605e5c0509c20..7991403eea467e812eb523155ee7eb9f11e888f8 100644 (file)
--- 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;