aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorRichard M. Stallman1997-01-13 03:33:26 +0000
committerRichard M. Stallman1997-01-13 03:33:26 +0000
commitde712da3be4b586a962c50b78decfa1fa279478b (patch)
tree0071b5135979cd30df610859ca1e31569902169b /src/fns.c
parent3fda54a2a27f6779d4a7a916dd0aa588c79dcd20 (diff)
downloademacs-de712da3be4b586a962c50b78decfa1fa279478b.tar.gz
emacs-de712da3be4b586a962c50b78decfa1fa279478b.zip
(concat): Take modulus of thisindex before shifting.
Declare thisindex as unsigned.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c4
1 files 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)
409 { 409 {
410 Lisp_Object thislen; 410 Lisp_Object thislen;
411 int thisleni; 411 int thisleni;
412 register int thisindex = 0; 412 register unsigned int thisindex = 0;
413 413
414 this = args[argnum]; 414 this = args[argnum];
415 if (!CONSP (this)) 415 if (!CONSP (this))
@@ -443,7 +443,7 @@ concat (nargs, args, target_type, last_special)
443 / BITS_PER_CHAR); 443 / BITS_PER_CHAR);
444 int byte; 444 int byte;
445 byte = XBOOL_VECTOR (val)->data[thisindex / BITS_PER_CHAR]; 445 byte = XBOOL_VECTOR (val)->data[thisindex / BITS_PER_CHAR];
446 if (byte & (1 << thisindex)) 446 if (byte & (1 << (thisindex % BITS_PER_CHAR)))
447 elt = Qt; 447 elt = Qt;
448 else 448 else
449 elt = Qnil; 449 elt = Qnil;