summaryrefslogtreecommitdiffstats
path: root/tests/013/rand.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-17 20:52:44 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-17 20:52:44 -0700
commitdd9ab5fc0b6c0b706288f8f5e20989b6e24921e9 (patch)
treec58d46d42e22737ae2a7d97df3c16802b3217925 /tests/013/rand.tl
parent84f3ab45a75a881cf7959edd381bbcd0ee828ed5 (diff)
downloadtxr-dd9ab5fc0b6c0b706288f8f5e20989b6e24921e9.tar.gz
txr-dd9ab5fc0b6c0b706288f8f5e20989b6e24921e9.tar.bz2
txr-dd9ab5fc0b6c0b706288f8f5e20989b6e24921e9.zip
ffi: bugfix: null terminated string as flexible member.
* ffi.c (ffi_char_array_get, ffi_zchar_array_get, ffi_wchar_array_get, ffi_bchar_array_get): Rearrange so that we test for tft->null_term first, and not nelem == 0. If nelem happens to be zero, but we are supposed to decode a null-terminated string, we will do the wrong thing and return the null string. (ffi_varray_in): The body can't be conditional on vec being non-nil, because then we do nothing if we don't have a Lisp object, which means we skip the cases when we should decode a null-terminated array. Now if vec is nil, we must guard against calling ffi_varray_dynsize.
Diffstat (limited to 'tests/013/rand.tl')
0 files changed, 0 insertions, 0 deletions