diff options
| author | Richard M. Stallman | 1997-01-13 03:33:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-01-13 03:33:26 +0000 |
| commit | de712da3be4b586a962c50b78decfa1fa279478b (patch) | |
| tree | 0071b5135979cd30df610859ca1e31569902169b /src/fns.c | |
| parent | 3fda54a2a27f6779d4a7a916dd0aa588c79dcd20 (diff) | |
| download | emacs-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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; |