summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-26 06:24:48 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-26 06:24:48 -0700
commitaf9a912dc2bb853f32382cd1f9e7df3a673d50b4 (patch)
tree53423788d9c29bad222a573a675af4c288d88c57
parent189726270806b308ab905597a8d40d14fcec1367 (diff)
downloadtxr-af9a912dc2bb853f32382cd1f9e7df3a673d50b4.tar.gz
txr-af9a912dc2bb853f32382cd1f9e7df3a673d50b4.tar.bz2
txr-af9a912dc2bb853f32382cd1f9e7df3a673d50b4.zip
ffi: bugfix: null-terminated zarray in semantics.
* ffi.c (ffi_varray_null_term_in): Pass zero to replace rather than 0, which corresponds to nil and is interpreted as a list by replace.
-rw-r--r--ffi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi.c b/ffi.c
index f9a20cbc..f9a4ebc3 100644
--- a/ffi.c
+++ b/ffi.c
@@ -2544,7 +2544,7 @@ static val ffi_varray_null_term_in(struct txr_ffi_type *tft, int copy, mem_t *sr
offs += elsize;
}
- return replace(vec_in, vec, 0, length_vec(vec));
+ return replace(vec_in, vec, zero, length_vec(vec));
}
static val ffi_varray_null_term_get(struct txr_ffi_type *tft, mem_t *src,