summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-12 06:09:45 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-12 06:09:45 -0700
commit45521a7f766a044dfd75f79b79a775791ba5b483 (patch)
tree82a22981493d5ec6a04673158236e98c1aa846e4
parent9bcfdc592b80228ba39383d2a63db2474fbd9517 (diff)
downloadtxr-45521a7f766a044dfd75f79b79a775791ba5b483.tar.gz
txr-45521a7f766a044dfd75f79b79a775791ba5b483.tar.bz2
txr-45521a7f766a044dfd75f79b79a775791ba5b483.zip
ffi: bugfix: broken i64 conversion.
* itypes.c (c_i64): Fix c_num being called on the function pointer num rather than the correct operand n.
-rw-r--r--itypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/itypes.c b/itypes.c
index e68f3c14..0fbfd351 100644
--- a/itypes.c
+++ b/itypes.c
@@ -101,7 +101,7 @@ u32_t c_u32(val n, val self)
#if SIZEOF_PTR == 8
i64_t c_i64(val n, val self)
{
- cnum v = c_num(num);
+ cnum v = c_num(n);
if (v < (cnum) -0x8000000000000000 || v > (cnum) 0x7FFFFFFFFFFFFFFF)
uw_throwf(error_s, lit("~a: value ~s is out of signed 64 bit range"),
self, n, nao);