diff options
author | dzaima <dzaimagit@gmail.com> | 2024-05-22 20:41:40 +0300 |
---|---|---|
committer | dzaima <dzaimagit@gmail.com> | 2024-05-22 20:41:40 +0300 |
commit | 5862c28c08d6e521e7ce752832aa181fa174f040 (patch) | |
tree | 146ab30543cddb3241f24c59cff0bffa8aa916bf | |
parent | f14583f995363f3e549a856b3ba8d1201c324959 (diff) |
avoid conversion of i64 to ux for pointer offset
-rw-r--r-- | src/ffi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |