diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-06-23 06:40:26 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-06-23 06:40:26 -0700 |
commit | eabf60be86513df75a08df8388099179c827b475 (patch) | |
tree | 700c4ca84484e3952d0d339c5f264c3dc4e22dfc | |
parent | ad4e4e79ac6b9fcb182f3cd834120ec79512ac9a (diff) | |
download | txr-eabf60be86513df75a08df8388099179c827b475.tar.gz txr-eabf60be86513df75a08df8388099179c827b475.tar.bz2 txr-eabf60be86513df75a08df8388099179c827b475.zip |
cyr: broken on 64 bit.
* lib.c (cyr): We must use the cnum type for the mask, not int.
-rw-r--r-- | lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1510,9 +1510,10 @@ val cyr(val addr, val obj) { cnum a = c_num(addr, self); if (a > 0) { - int m, h = highest_bit(a); + int h = highest_bit(a); + cnum m; if (h > 1) { - for (m = 1 << (h - 2); m != 0; m >>= 1) + for (m = convert(cnum, 1) << (h - 2); m != 0; m >>= 1) obj = if3((a & m) != 0, car(obj), cdr(obj)); } return obj; |