summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordzaima <dzaimagit@gmail.com>2024-05-22 20:41:40 +0300
committerdzaima <dzaimagit@gmail.com>2024-05-22 20:41:40 +0300
commit5862c28c08d6e521e7ce752832aa181fa174f040 (patch)
tree146ab30543cddb3241f24c59cff0bffa8aa916bf
parentf14583f995363f3e549a856b3ba8d1201c324959 (diff)
avoid conversion of i64 to ux for pointer offset
-rw-r--r--src/ffi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ffi.c b/src/ffi.c
index 131cc0c7..7acc38f6 100644
--- a/src/ffi.c
+++ b/src/ffi.c
@@ -1210,7 +1210,7 @@ static void* ptrobj_elbase(B h, B off, bool negate) { // doesn't consume h, off
char* ptr = ptrh_ptr(h);
i64 el = o2i64(off);
if (negate) el = -el;
- return ptr + ptrh_stride(h)*el;
+ return ptr + el * (i64)ptrh_stride(h);
}
static B ptrobjRead_c1(B t, B x) {
B h = nfn_objU(t);