diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-05 19:27:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-05 19:27:10 -0700 |
commit | 93fa7fe160423fe9af34bd20bc47a0ef889c7983 (patch) | |
tree | 6918bc4282e31f86177cc63ee524414dbaa07e5d /itypes.c | |
parent | 6d11126e4643599b38b1d8b92ad468ef02539b95 (diff) | |
download | txr-93fa7fe160423fe9af34bd20bc47a0ef889c7983.tar.gz txr-93fa7fe160423fe9af34bd20bc47a0ef889c7983.tar.bz2 txr-93fa7fe160423fe9af34bd20bc47a0ef889c7983.zip |
itypes: fix broken u64_t range check.
* itypes.c (c_u64): Replace copy and pasted signed
check with the unsigned check.
Diffstat (limited to 'itypes.c')
-rw-r--r-- | itypes.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -110,8 +110,8 @@ i64_t c_i64(val n, val self) u64_t c_u64(val n, val self) { - uint_ptr_t v = c_unum(n); - if (v < (cnum) -0x8000000000000000 || v > (cnum) 0x7FFFFFFFFFFFFFFF) + ucnum v = c_unum(n); + if (v > (ucnum) 0xFFFFFFFFFFFFFFFF) uw_throwf(error_s, lit("~a: value ~s is out of unsigned 64 bit range"), self, n, nao); return v; |