summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-02-13 18:37:02 +0000
committerKaz Kylheku <kaz@kylheku.com>2025-02-13 18:37:02 +0000
commitcc05029249b35b7f65e9a308a6d07aaed060c0b5 (patch)
treef2276fbf5c57e09d17398dba6bee2d5af17ba444
parenta6be8523d564722a1ee3b3b1b21a2f9c78ba3210 (diff)
downloadtxr-cc05029249b35b7f65e9a308a6d07aaed060c0b5.tar.gz
txr-cc05029249b35b7f65e9a308a6d07aaed060c0b5.tar.bz2
txr-cc05029249b35b7f65e9a308a6d07aaed060c0b5.zip
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.
-rw-r--r--ffi.c2
1 files changed, 1 insertions, 1 deletions
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);
}