From 62c7ddbe6a6b8ec40a03ab12823688c2aafc8a34 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 13 Feb 2025 18:37:02 +0000 Subject: ffi: big endian: broken be-int16 closure return. * ffi.c (ffi_be_i16_rput): We need to memset the remaining parts of the 64 bit word to 0, like in all the other ffi_be_xxx_put functions that are less than 64 bits wide. Also removing the (void) tft cast is removed since tft is used. --- ffi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffi.c b/ffi.c index d5769e21..0aa019dc 100644 --- a/ffi.c +++ b/ffi.c @@ -2131,7 +2131,7 @@ static val ffi_wchar_rget(struct txr_ffi_type *tft, mem_t *src, val self) static void ffi_be_i16_rput(struct txr_ffi_type *tft, val n, mem_t *dst, val self) { - (void) tft; + memset(dst, 0, 6); ffi_be_i16_put(tft, n, dst + 6, self); } -- cgit v1.2.3